file functions
- sizefile - human readable file size
- directorysize - direcotry size in bytes
- get_file_type - file content type
- filedownload - file download
sizefile($size)
format bytes to human readable file size
echo sizefile(1024); // 1 Kb
directorysize($dir)
return size of direcory not recursively it may be slow if direcotry contains lots of files
echo directorysize('cache'); // 100345
get_file_type($file)
return content type of file specified by filename
filedownload($filename,$pathtofile,$content='attachment')
// offers download filedownload('file.txt','/tmp/file.log'); // open file to the browser filedownload('file.txt','/tmp/file.log','inline');







