bout_runners.utils.file_operations

Module containing file operation functions.

Functions

copy_restart_files(copy_restart_from, …)

Copy restart files.

get_caller_dir()

Return the directory of the topmost caller file.

get_modified_time(file_path)

Return the modification time of a file path.

bout_runners.utils.file_operations.copy_restart_files(copy_restart_from: Union[str, pathlib.Path], copy_restart_to: Union[str, pathlib.Path]) → None[source]

Copy restart files.

Parameters
copy_restart_fromstr or Path

Directory to copy restart files from

copy_restart_tostr or Path

Directory to copy restart files to

Raises
FileNotFoundError

In case no restart files are found

bout_runners.utils.file_operations.get_caller_dir() → pathlib.Path[source]

Return the directory of the topmost caller file.

Returns
caller_dirPath

The path of the topmost caller

bout_runners.utils.file_operations.get_modified_time(file_path: pathlib.Path) → str[source]

Return the modification time of a file path.

Parameters
file_pathPath

The file path to get the modification time from

Returns
modified_timestr

The modification time on ISO8601 format