Documentation

File


File

dir_scan
Return an array list of files and directories inside the selected path.

dir_scan("tmp/");



file_list

Return an array list of files inside the selected path, filtered by extension. If extension is null gets all the files.

file_list("tmp/","jpg");



dir_list

Get the array list of directory inside the selected directory

dir_list("tpl/");



file_ext

Return the extension of the selected file

// e.g. return "jpg"
file_ext("logo.jpg");



dir_del

Delete the selected dir and its contents

dir_del("ups/");

 

dir_copy
Copy directory and files.

dir_copy("tpl/","tpl_copy/");

 

upload_file
Use this function to get file uploaded by form. The file it's saved into the upload directory (UPS_DIR) with a random md5 name. The function return the name of the saved file.

// upload and return the filename
$filename = upload_file("filename");