Make WordPress Core


Ignore:
Timestamp:
09/22/2013 04:43:29 AM (11 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r25306 r25560  
    11<?php
    22/**
    3  * WordPress SSH2 Filesystem.
    4  *
    5  * @package WordPress
    6  * @subpackage Filesystem
    7  */
    8 
    9 /**
    10  * WordPress Filesystem Class for implementing SSH2.
     3 * WordPress Filesystem Class for implementing SSH2
    114 *
    125 * To use this class you must follow these steps for PHP 5.2.6+
     
    3629 * Note: as of WordPress 2.8, This utilises the PHP5+ function 'stream_get_contents'
    3730 *
    38  * @since 2.7
     31 * @since 2.7.0
     32 *
    3933 * @package WordPress
    4034 * @subpackage Filesystem
    41  * @uses WP_Filesystem_Base Extends class
    4235 */
    4336class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
     
    209202    }
    210203
    211     function chown($file, $owner, $recursive = false ) {
     204    /**
     205     * Change the ownership of a file / folder.
     206     *
     207     * @since Unknown
     208     *
     209     * @param string $file    Path to the file.
     210     * @param mixed  $owner   A user name or number.
     211     * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False.
     212     * @return bool Returns true on success or false on failure.
     213     */
     214    function chown( $file, $owner, $recursive = false ) {
    212215        if ( ! $this->exists($file) )
    213216            return false;
Note: See TracChangeset for help on using the changeset viewer.