Dir::read()
Reads all files from a directory and returns them as an array. It skips unwanted invisible stuff.
Dir::read(string $dir, array $ignore = null, bool $absolute = false): array
Parameters
Name | Type | Default | Description |
---|---|---|---|
$dirrequired | string |
no default value | The path of directory |
$ignore | array |
null
|
Optional array with filenames, which should be ignored |
$absolute | bool |
false
|
If true, the full path for each item will be returned |
Return type
array
An array of filenames