More File Functions

Contact Us or call 1-877-932-8228
More File Functions

More File Functions

A few more file functions are shown below:

Function Description
file_exists(path_to_file) Checks to see if a file exists.
filesize(path_to_file) Returns the size of file in bytes.
unlink(path_to_file) Deletes the file.
copy() Copies a file. Takes two arguments: the path to the source file and the destination to copy the source file to.
rename() Moves a file. Takes two arguments: the path to the source file and the destination to move the source file to. If the path and destination are the same with the exception of the filename, rename() simply renames the file.
Next