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-ssh2.php

    r55354 r55714  
    742742     *                               Default false.
    743743     * @return array|false {
    744      *     Array of files. False if unable to list directory contents.
    745      *
    746      *     @type string $name        Name of the file or directory.
    747      *     @type string $perms       *nix representation of permissions.
    748      *     @type string $permsn      Octal representation of permissions.
    749      *     @type string $owner       Owner name or ID.
    750      *     @type int    $size        Size of file in bytes.
    751      *     @type int    $lastmodunix Last modified unix timestamp.
    752      *     @type mixed  $lastmod     Last modified month (3 letter) and day (without leading 0).
    753      *     @type int    $time        Last modified time.
    754      *     @type string $type        Type of resource. 'f' for file, 'd' for directory.
    755      *     @type mixed  $files       If a directory and `$recursive` is true, contains another array of files.
     744     *     Array of arrays containing file information. False if unable to list directory contents.
     745     *
     746     *     @type array $0... {
     747     *         Array of file information. Note that some elements may not be available on all filesystems.
     748     *
     749     *         @type string           $name        Name of the file or directory.
     750     *         @type string           $perms       *nix representation of permissions.
     751     *         @type string           $permsn      Octal representation of permissions.
     752     *         @type false            $number      File number. Always false in this context.
     753     *         @type string|false     $owner       Owner name or ID, or false if not available.
     754     *         @type string|false     $group       File permissions group, or false if not available.
     755     *         @type int|string|false $size        Size of file in bytes. May be a numeric string.
     756     *                                             False if not available.
     757     *         @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string.
     758     *                                             False if not available.
     759     *         @type string|false     $lastmod     Last modified month (3 letters) and day (without leading 0), or
     760     *                                             false if not available.
     761     *         @type string|false     $time        Last modified time, or false if not available.
     762     *         @type string           $type        Type of resource. 'f' for file, 'd' for directory, 'l' for link.
     763     *         @type array|false      $files       If a directory and `$recursive` is true, contains another array of
     764     *                                             files. False if unable to list directory contents.
     765     *     }
    756766     * }
    757767     */
Note: See TracChangeset for help on using the changeset viewer.