Universeorange.com/Docs/
The
File classhas these methods.
File::is($url);
Checks if the $url is a file.
File::mtime($url);
Returns the modification time of the file.
File::atime($url);
Returns the access time of the file.
File::link($source, $destination);
Creates a link from $source in $destination.
File::count($directory, $include_directory=false);
Counts the amount of files in a directory.
If you want to include directories in the count set $include_directory to true.
File::exist($url);
Checks if a file exists.
File::touch($url='', $time=null, $atime=null);
Touches a file with $time and $atime (access time).
File::info(stdClass $node);
Adds information to the file.
File::chown($url='', $owner=null, $group=null, $recursive=false);
Change the owner of the $url.
If $owner and $group are null, root:root is used.
On directories $recursive can be used to include files in subdirectories.
File::move($source='', $destination='', $overwrite=false);
Moves a file from $source to $destination.
If $destination exists the file is not moved until $overwrite is set to true.
File::chmod($url, $mode=0640);
Changes the file mode of a file.
File::write($url='', $data='');
Writes data $data (String) to the file $url.
File::append($url='', $data='');
Appends data (String) to the file.
File::read($url='');
Reads a file and returns it.
File::copy($source='', $destination='');
Copy a file from $source to $destination
File::delete($url='');
Unlink the file $url.
File::extension($url='');
Returns the file extension.
File::basename($url='', $extension='');
returns the basename of the file.
File::removeExtension($filename='', $extension=[]);
Removes the extension of a file.
File::ucfirst($url='');
Create Capital filenames between . (dots).
For example from test.test.tpl to Test.Test.tpl.
File::size($url='');
Returns the file size in bytes.
Last modified: 2021-06-06
© 2021 universeorange.com