Function Commandr_fs->listing
Definitions
sources/commandr_fs.php
- Return a directory and file listing of the current working directory. Equivalent to Unix "ls".
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $dir | ?array | No | No | Null | N/A | N/A | An alternate directory in which to perform the action (null: current directory is used) |
Returns
- Directories and files in the current working directory
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Return a directory and file listing of the current working directory. Equivalent to Unix "ls".
*
* @param ?array $dir An alternate directory in which to perform the action (null: current directory is used)
* @return array Directories and files in the current working directory
*/
public function listing(?array $dir = null) : array
* Return a directory and file listing of the current working directory. Equivalent to Unix "ls".
*
* @param ?array $dir An alternate directory in which to perform the action (null: current directory is used)
* @return array Directories and files in the current working directory
*/
public function listing(?array $dir = null) : array

