MY File Helper
Contains functions to be used with files. Extends CI's file helper.
This helper is loaded using the following code:
$this->load->helper('file');
The following functions are available:
get_dir_file_info(source_dir, [include_path])
Overwrites CI's get_dir_file_info and adds the ability to include the path in the array returned which defaults to FALSE.
delete_files(path, [del_dir], [exclude], [level])
Overwrites CI's delete_files and adds the ability to exclude certain files by passing either an array of file names or a regular expression string. del_dir defaults to FALSE. exclude excludes files from being deleted. Can be either an array of file names or a regular expression string. level how many levels deep to delete.
is_image_file(path)
Determines if the path value is an image. Returns a boolean.