This package provides some file-related functions.
Sets owner and/or access rights on a file.
Returns true value if setting rights succeeded. Otherwise returns false value.
Note: If superuser was specified as owner, this function will die.
- copy_dir($dir1, $dir2)
Copy a directory and its content
Delete a directory and its content
To be used before creating a file in a directory that may not exist already.
- mkdir_all($path, $mode)
Recursively create directory and all parent directories
- shift_file($file, $count)
Shift file renaming it with date. If count is defined, keep
$countfile and unlink others
- get_mtime ( $file )
Gets modification time of the file.
Full path of file.
Modification time as UNIX time. If the file is not found (including the case that the file vanishes during execution of this function) or is not readable, returns
POSIX::INT_MIN. In case of other error, returns
- list_dir($dir, $all, $original_encoding)
Recursively list the content of a directory Return an array of hash, each entry with directory + filename + encoding
Q-encodes a complete file hierarchy. Useful to Q-encode subshared documents.
ToDo: See a comment on “qencode_filename” in Sympa::Tools::Text.
Function for Removing a non-empty directory. It takes a variable number of arguments: It can be a list of directory or few directory paths.
Sympa::Tools::File appeared on Sympa 6.2a.41.