MY Directory Helper
Contains functions to be used with directories. Extends CI's directory helper.
This helper is loaded using the following code:
$this->load->helper('directory');
The following functions are available:
copyr(source_dir, dest)
Recursively copies from one directory to another.
chmodr(source_dir, permissions)
Recursively changes permissions on a directory structure.
directory_to_array(directory, [recursive], [exclude], [append_path], [no_ext])
Returns an array of file names from a directory. recursive will recursively look through directories and the default is TRUE. exclude excludes files from being listed. Can be either an array of file names or a regular expression string. append_path appends the full path to the array key path value. no_ext says whether to include the file extension in the return. Default is FALSE.
list_directories(directory, [exclude], [full_path], [is_writable])
Recursively lists directories from within a given directory. exclude excludes files from being listed. Can be either an array of file names or a regular expression string. full_path says whether to include the full path in the liste. is_writable is whether to include just writable files. Default is FALSE.