Module zut.files
A standardized interface to access different kinds of “files”: entries in ZIP archives, samba shares, S3 objects, access via sudo.
Functions
|
Archivate path to archive_dir directory (or zip entry), ensuring unique archive name. |
|
|
|
Copy file data and file data and file's permission mode (which on Windows is only the read-only flag). |
|
Identical to copy() except that copy2() also attempts to preserve the file metadata. |
|
Copy the contents (no metadata) in the most efficient way possible. |
|
Copy the permission bits from src to dst. |
|
Copy the read-only attribute, last access time, and last modification time from src to dst. |
|
Recursively copy a directory tree rooted at src to a directory named dst and return the destination directory. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A path join function that do not depend on the platform, is compatible with URLs, SMB shares and zipPath directory entries. |
|
|
|
|
|
Open the file in bytes mode, read it, and close the file. |
|
Open the file in text mode, read it, and close the file. |
|
|
|
|
|
A path split function that do not depend on the platform, is compatible with URLs, SMB shares and zipPath directory entries: - Keep leading slash(es): may be Linux root or SMB share - Keep trailing slash(es): may indicate a directory (necessary in ZipPath.at to designate a directory) - Keep URL separator :// |
|
|
|
Open the file in bytes mode, write to it, and close the file. |
|
Open the file in text mode, write to it, and close the file. |
Classes
|
|
|
|
|