Contains various function for working with filesystem
integer dir_disk_usage( string $location, [array $exclude = array()] )
Returns disk usage of directory $location in bytes.
This function is taken from comments in PHP Manual. Credits to Gregor Mosheh. Warning: it can be very slow in windows for dirs with more than 1000 files
boolean empty_dir( string $directory )
Removes all content from dir.
Returns true on success, false otherwise
array find_files( [directory $location = ''], [regex $fileregex = ''] )
Enter description here...
unknown is_dir_empty( unknown_type $directory )
Check if the dir is empty.
assumes that parameter $dir i really directory. Unexpected behaviour if that is not satisfied. Returns true on success, false otherwise
boolean mkdir_ine( string $dir )
Creates directory if not already exists
boolean rmdirr( string $directory )
Removes directory
Removes directory (and it's entire content first, if necessarry) Returns true on success, false otherwise
unknown strip_dots_from_path( unknown_type $path )
Removes '../' sequence from path. Used internaly.
unknown strip_last_item_from_path( unknown_type $path )
Strips last item from path
Example: printbr(strip_last_item_from_path('/var/www/sites/somefile.php')); printbr(strip_last_item_from_path('/var/www/sites'))
Will produce: /var/www/sites /var/www
boolean tangra_copy_dir_content( string $source_dir, string$destination_dir $destination_dir, [boolean $is_root = true] )
Copies entire directory content
boolean tangra_copy_dir_content_wo_svn( string $source_dir, string $destination_dir, [string $is_root = true] )
Copies entire dir content without .svn subdirs
boolean tangra_dir_exists( string $path )
Checks if directory exists and is really directory
Returns true if it is directory.
boolean _empty_dir( unknown_type $directory )
It is not intended to be called directly. Use @link empty_dir instead