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

    r55641 r55714  
    624624     *                               Default false.
    625625     * @return array|false {
    626      *     Array of files. False if unable to list directory contents.
    627      *
    628      *     @type string $name        Name of the file or directory.
    629      *     @type string $perms       *nix representation of permissions.
    630      *     @type string $permsn      Octal representation of permissions.
    631      *     @type string $owner       Owner name or ID.
    632      *     @type int    $size        Size of file in bytes.
    633      *     @type int    $lastmodunix Last modified unix timestamp.
    634      *     @type mixed  $lastmod     Last modified month (3 letter) and day (without leading 0).
    635      *     @type int    $time        Last modified time.
    636      *     @type string $type        Type of resource. 'f' for file, 'd' for directory.
    637      *     @type mixed  $files       If a directory and `$recursive` is true, contains another array of files.
     626     *     Array of arrays containing file information. False if unable to list directory contents.
     627     *
     628     *     @type array $0... {
     629     *         Array of file information. Note that some elements may not be available on all filesystems.
     630     *
     631     *         @type string           $name        Name of the file or directory.
     632     *         @type string           $perms       *nix representation of permissions.
     633     *         @type string           $permsn      Octal representation of permissions.
     634     *         @type int|string|false $number      File number. May be a numeric string. False if not available.
     635     *         @type string|false     $owner       Owner name or ID, or false if not available.
     636     *         @type string|false     $group       File permissions group, or false if not available.
     637     *         @type int|string|false $size        Size of file in bytes. May be a numeric string.
     638     *                                             False if not available.
     639     *         @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string.
     640     *                                             False if not available.
     641     *         @type string|false     $lastmod     Last modified month (3 letters) and day (without leading 0), or
     642     *                                             false if not available.
     643     *         @type string|false     $time        Last modified time, or false if not available.
     644     *         @type string           $type        Type of resource. 'f' for file, 'd' for directory, 'l' for link.
     645     *         @type array|false      $files       If a directory and `$recursive` is true, contains another array of
     646     *                                             files. False if unable to list directory contents.
     647     *     }
    638648     * }
    639649     */
Note: See TracChangeset for help on using the changeset viewer.