get_dir_file_info()

get_dir_file_info($source_dir, $top_level_only)

Parameters:
  • $source_dir (string) – Directory path
  • $top_level_only (bool) – Whether to look only at the specified directory (excluding sub-directories)
Returns:

An array containing info on the supplied directory’s contents

Return type:

array

Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced by sending the second parameter to FALSE, as this can be an intensive operation.

Example:

$models_info = get_dir_file_info(APPPATH.'models/');
doc_CodeIgniter
2016-10-15 16:32:23
Comments
Leave a Comment

Please login to continue.