WP_Filesystem_Base::dirlist()publicWP 2.5.0

Gets details for files in a directory or a specific file.

Method of the class: WP_Filesystem_Base{}

No Hooks.


Array|false. Array of arrays containing file information. False if unable to list directory contents.


$WP_Filesystem_Base = new WP_Filesystem_Base();
$WP_Filesystem_Base->dirlist( $path, $include_hidden, $recursive );
$path(string) (required)
Path to directory or file.
Whether to include details of hidden ("." prefixed) files.
Default: true
Whether to recursively include file details in nested directories.
Default: false


Since 2.5.0 Introduced.

WP_Filesystem_Base::dirlist() code WP 6.5.2

public function dirlist( $path, $include_hidden = true, $recursive = false ) {
	return false;