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:
Dion Hulse
2013-09-22 04:43:29 +00:00
parent f32eac7a75
commit 455b8d47a9
5 changed files with 458 additions and 92 deletions
@@ -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);