Make WordPress Core


Ignore:
Timestamp:
12/01/2014 12:12:05 AM (10 years ago)
Author:
wonderboymusic
Message:

Improve various @param docs for src/wp-admin/includes/class-wp-filesystem-*.php.

See #30224.

File:
1 edited

Legend:

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

    r29206 r30678  
    201201    }
    202202
     203    /**
     204     * @param string $file
     205     * @return string
     206     */
    203207    public function group($file) {
    204208        $gid = @filegroup($file);
     
    211215    }
    212216
     217    /**
     218     * @param string $source
     219     * @param string $destination
     220     * @param bool   $overwrite
     221     * @param int    $mode
     222     * @return bool
     223     */
    213224    public function copy($source, $destination, $overwrite = false, $mode = false) {
    214225        if ( ! $overwrite && $this->exists($destination) )
     
    221232    }
    222233
     234    /**
     235     * @param string $source
     236     * @param string $destination
     237     * @param bool $overwrite
     238     * @return bool
     239     */
    223240    public function move($source, $destination, $overwrite = false) {
    224241        if ( ! $overwrite && $this->exists($destination) )
     
    237254    }
    238255
     256    /**
     257     * @param string $file
     258     * @param bool $recursive
     259     * @param string $type
     260     * @return bool
     261     */
    239262    public function delete($file, $recursive = false, $type = false) {
    240263        if ( empty( $file ) ) // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem.
     
    264287        return $retval;
    265288    }
    266 
     289    /**
     290     * @param string $file
     291     * @return bool
     292     */
    267293    public function exists($file) {
    268294        return @file_exists($file);
    269295    }
    270 
     296    /**
     297     * @param string $file
     298     * @return bool
     299     */
    271300    public function is_file($file) {
    272301        return @is_file($file);
    273302    }
    274 
     303    /**
     304     * @param string $path
     305     * @return bool
     306     */
    275307    public function is_dir($path) {
    276308        return @is_dir($path);
    277309    }
    278310
     311    /**
     312     * @param string $file
     313     * @return bool
     314     */
    279315    public function is_readable($file) {
    280316        return @is_readable($file);
    281317    }
    282318
     319    /**
     320     * @param string $file
     321     * @return bool
     322     */
    283323    public function is_writable($file) {
    284324        return @is_writable($file);
    285325    }
    286326
     327    /**
     328     * @param string $file
     329     * @return int
     330     */
    287331    public function atime($file) {
    288332        return @fileatime($file);
    289333    }
    290334
     335    /**
     336     * @param string $file
     337     * @return int
     338     */
    291339    public function mtime($file) {
    292340        return @filemtime($file);
    293341    }
    294342
     343    /**
     344     * @param string $file
     345     * @return int
     346     */
    295347    public function size($file) {
    296348        return @filesize($file);
    297349    }
    298350
     351    /**
     352     * @param string $file
     353     * @param int $time
     354     * @param int $atime
     355     * @return bool
     356     */
    299357    public function touch($file, $time = 0, $atime = 0) {
    300358        if ($time == 0)
     
    305363    }
    306364
     365    /**
     366     * @param string $path
     367     * @param mixed  $chmod
     368     * @param mixed  $chown
     369     * @param mixed  $chgrp
     370     * @return bool
     371     */
    307372    public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
    308373        // Safe mode fails with a trailing slash under certain PHP versions.
     
    324389    }
    325390
     391    /**
     392     * @param string $path
     393     * @param bool $recursive
     394     * @return type
     395     */
    326396    public function rmdir($path, $recursive = false) {
    327397        return $this->delete($path, $recursive);
    328398    }
    329399
     400    /**
     401     * @param string $path
     402     * @param bool $include_hidden
     403     * @param bool $recursive
     404     * @return bool|array
     405     */
    330406    public function dirlist($path, $include_hidden = true, $recursive = false) {
    331407        if ( $this->is_file($path) ) {
Note: See TracChangeset for help on using the changeset viewer.