Make WordPress Core


Ignore:
Timestamp:
05/03/2023 09:28:11 PM (19 months ago)
Author:
johnbillion
Message:

Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes.

Props mat-lipe, szepeviktor, costdev, audrasjb, johnbillion

Fixes #58229
See #57840

File:
1 edited

Legend:

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

    r54133 r55714  
    828828     *                               Default false.
    829829     * @return array|false {
    830      *     Array of files. False if unable to list directory contents.
    831      *
    832      *     @type string $name        Name of the file or directory.
    833      *     @type string $perms       *nix representation of permissions.
    834      *     @type string $permsn      Octal representation of permissions.
    835      *     @type string $owner       Owner name or ID.
    836      *     @type int    $size        Size of file in bytes.
    837      *     @type int    $lastmodunix Last modified unix timestamp.
    838      *     @type mixed  $lastmod     Last modified month (3 letter) and day (without leading 0).
    839      *     @type int    $time        Last modified time.
    840      *     @type string $type        Type of resource. 'f' for file, 'd' for directory.
    841      *     @type mixed  $files       If a directory and `$recursive` is true, contains another array of files.
     830     *     Array of arrays containing file information. False if unable to list directory contents.
     831     *
     832     *     @type array $0... {
     833     *         Array of file information. Note that some elements may not be available on all filesystems.
     834     *
     835     *         @type string           $name        Name of the file or directory.
     836     *         @type string           $perms       *nix representation of permissions.
     837     *         @type string           $permsn      Octal representation of permissions.
     838     *         @type int|string|false $number      File number. May be a numeric string. False if not available.
     839     *         @type string|false     $owner       Owner name or ID, or false if not available.
     840     *         @type string|false     $group       File permissions group, or false if not available.
     841     *         @type int|string|false $size        Size of file in bytes. May be a numeric string.
     842     *                                             False if not available.
     843     *         @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string.
     844     *                                             False if not available.
     845     *         @type string|false     $lastmod     Last modified month (3 letters) and day (without leading 0), or
     846     *                                             false if not available.
     847     *         @type string|false     $time        Last modified time, or false if not available.
     848     *         @type string           $type        Type of resource. 'f' for file, 'd' for directory, 'l' for link.
     849     *         @type array|false      $files       If a directory and `$recursive` is true, contains another array of
     850     *                                             files. False if unable to list directory contents.
     851     *     }
    842852     * }
    843853     */
Note: See TracChangeset for help on using the changeset viewer.