list_files


list_files ( $folder = '', $levels = 100, $exclusions = array() )

Parameters:
  • (string) folder Optional. Full path to folder. Default empty.
  • (int) levels Optional. Levels of folders to follow, Default 100 (PHP Loop limit).
  • (string[]) exclusions Optional. List of folders and files to skip.
Returns:
  • (bool|string[]) False on failure, else array of files.
Defined at:
Change Log:
  • 4: .

Description

Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep.The depth of the recursiveness can be controlled by the $levels param.

Related Functions

wp_list_filter, validate_file, wp_list_widgets, list_cats, is_single

Top Google Results

User discussions

wpseek mobile