mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
First pass at documenting the WP_Filesystem methods. This also introduces stubs of the methods into the base class which are documented, which subclasses can override, some methods were cleaned up at the same time.
See #18476 See #23122. Props kurtpayne, bananastalktome, and, DrewAPicture git-svn-id: https://develop.svn.wordpress.org/trunk@25560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* @uses WP_Filesystem_Base Extends class
|
||||
*/
|
||||
class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
var $errors = null;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
@@ -26,15 +26,6 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
$this->errors = new WP_Error();
|
||||
}
|
||||
|
||||
/**
|
||||
* connect filesystem.
|
||||
*
|
||||
* @return bool Returns true on success or false on failure (always true for WP_Filesystem_Direct).
|
||||
*/
|
||||
function connect() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads entire file into a string
|
||||
*
|
||||
@@ -185,7 +176,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
* Gets file owner
|
||||
*
|
||||
* @param string $file Path to the file.
|
||||
* @return string Username of the user.
|
||||
* @return string|bool Username of the user or false on error.
|
||||
*/
|
||||
function owner($file) {
|
||||
$owneruid = @fileowner($file);
|
||||
|
||||
Reference in New Issue
Block a user