Make WordPress Core


Ignore:
Timestamp:
05/03/2023 09:28:11 PM (20 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-direct.php

    r55354 r55714  
    598598     *                               Default false.
    599599     * @return array|false {
    600      *     Array of files. False if unable to list directory contents.
    601      *
    602      *     @type string $name        Name of the file or directory.
    603      *     @type string $perms       *nix representation of permissions.
    604      *     @type string $permsn      Octal representation of permissions.
    605      *     @type string $owner       Owner name or ID.
    606      *     @type int    $size        Size of file in bytes.
    607      *     @type int    $lastmodunix Last modified unix timestamp.
    608      *     @type mixed  $lastmod     Last modified month (3 letter) and day (without leading 0).
    609      *     @type int    $time        Last modified time.
    610      *     @type string $type        Type of resource. 'f' for file, 'd' for directory.
    611      *     @type mixed  $files       If a directory and `$recursive` is true, contains another array of files.
     600     *     Array of arrays containing file information. False if unable to list directory contents.
     601     *
     602     *     @type array $0... {
     603     *         Array of file information. Note that some elements may not be available on all filesystems.
     604     *
     605     *         @type string           $name        Name of the file or directory.
     606     *         @type string           $perms       *nix representation of permissions.
     607     *         @type string           $permsn      Octal representation of permissions.
     608     *         @type false            $number      File number. Always false in this context.
     609     *         @type string|false     $owner       Owner name or ID, or false if not available.
     610     *         @type string|false     $group       File permissions group, or false if not available.
     611     *         @type int|string|false $size        Size of file in bytes. May be a numeric string.
     612     *                                             False if not available.
     613     *         @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string.
     614     *                                             False if not available.
     615     *         @type string|false     $lastmod     Last modified month (3 letters) and day (without leading 0), or
     616     *                                             false if not available.
     617     *         @type string|false     $time        Last modified time, or false if not available.
     618     *         @type string           $type        Type of resource. 'f' for file, 'd' for directory, 'l' for link.
     619     *         @type array|false      $files       If a directory and `$recursive` is true, contains another array of
     620     *                                             files. False if unable to list directory contents.
     621     *     }
    612622     * }
    613623     */
Note: See TracChangeset for help on using the changeset viewer.