rename_files#

atomate2.common.files.rename_files(filenames: dict[str | Path, str | Path], directory: str | Path | None = None, host: str | None = None, allow_missing: bool = False, file_client: FileClient | None = None)[source]#

Delete files in a directory.

Parameters
filenamesdict

Files to rename. Given as a dictionary of {old_name: new_name}. File names should be given relative to directory. Glob matches are not supported.

directorystr or Path or None

Directory in which to rename files. If None, the current directory will be used (or home folder if specifying a remote host).

hoststr or None

The hostname used to specify a remote filesystem. Can be given as either “username@host” or just “host” in which case the username will be inferred from the current user. If None, the local filesystem will be used.

allow_missingbool

Whether to error if a file in include_files is not present in the directory.

file_clientFileClient

A file client to use for performing file operations.