orca.utils.copyutils
File copying utilities with fsync support.
Provides file copying functions that include explicit fsync calls to ensure data is flushed to disk, important for HPC environments with network/parallel filesystems.
Modified from shutil to add fsync after write operations.
Functions
|
Copy file with mode bits, ensuring data is synced to disk. |
|
Copy data from src to dst in the most efficient way possible. |
Module Contents
- orca.utils.copyutils.copy(src: str, dst: str, *, follow_symlinks: bool = True) str[source]
Copy file with mode bits, ensuring data is synced to disk.
- Parameters:
src – Source file path.
dst – Destination file or directory path.
follow_symlinks – If False, copy symlinks as symlinks.
- Returns:
Destination path.
- orca.utils.copyutils.copyfile(src, dst, *, follow_symlinks=True)[source]
Copy data from src to dst in the most efficient way possible.
If follow_symlinks is not set and src is a symbolic link, a new symlink will be created instead of copying the file it points to.
Copied from shutil and modified to add an fsync.