getContents()
public method
Reads data from filesystem object if it is a regular file.
List files and directories inside the specified path if filesystem object is a directory.
public getContents ( boolean $recursive = False, string $filter = null ) : string | array | boolean |
$recursive |
boolean |
If True method would return all directory descendants. |
$filter |
string |
Filter to be applied to all directory descendants. Could be a string, or an array
of strings (perl regexp are supported, if started with '~'). |
return |
string | array | boolean |
Data read for files, or directory contents names array. False on fail. |