FUEL CMS User Guide : Version 1.5.2


My File Helper

Overwrites CI's file helper

Function Reference [+]

get_dir_file_info('$source_dir', ['$top_level_only'=TRUE], ['$include_path'=FALSE], ['$_recursion'=FALSE])

Gets the directory file info.

Returns

array

Parameters

(string) $source_dir 
(boolean) $top_level_only 
(boolean) $include_path 

delete_files('$path', ['$del_dir'=FALSE], ['$exclude'=NULL], ['$level'=0])

Deletes files in a directory with the added option to exclude certain files.

Returns

void

Parameters

(string) $path 
(boolean) $del_dir 
(mixed) $exclude 
(int) $level 

delete_old_files('$dir', '$older_than', [$exclude=array()])

Deletes files in a directory older then a certain date with the added option to exclude certain files.

Returns

void

Parameters

(string) $dir 
(string) $older_than 
(mixed) $exclude 

is_image_file('$path')

Determines if the file is an image.

Returns

boolean

Parameters

(string) $path