copy_files
copy_files#
- atomate2.common.files.copy_files(src_dir: str | Path, dest_dir: str | Path | None = None, src_host: str | None = None, include_files: list[str | Path] | None = None, exclude_files: list[str | Path] | None = None, suffix: str = '', prefix: str = '', allow_missing: bool = False, file_client: FileClient | None = None)[source]#
Copy files between source and destination folders.
- Parameters
- src_dir
str
orPath
The source directory.
- dest_dir
str
orPath
orNone
The destination directory.
- src_host
str
orNone
The source hostname used to specify a remote filesystem. Can be given as either “usernamehost” or just “host” in which case the username will be inferred from the current user. If
None
, the local filesystem will be used as the source.- include_files
None
orlist
of
(str
orPath
) Filenames to include as a list of str or Path objects given relative to
src_dir
. Glob file paths are supported, e.g. “*.dat”. IfNone
, all files in the source directory will be copied.- exclude_files
None
orlist
of
(str
orPath
) Filenames to exclude. Supports glob file matching, e.g., “*.dat”.
- suffix
str
A suffix to add to copied files. For example “.original”.
- prefix
str
A prefix to add to copied files. For example “original.”.
- allow_missingbool
Whether to error if a file in
include_files
is not present in the source directory.- file_client
FileClient
A file client to use for performing file operations.
- src_dir