common.file_system_utils

Filesystem helpers used by the agent scripts.

Functions

create_file(file)

Create an empty file at file, truncating it if it exists.

create_folders_if_necessary(paths)

Create each directory in paths if it does not already exist.

delete_dir(dir)

Delete the directory dir recursively.

common.file_system_utils.create_file(file)[source]

Create an empty file at file, truncating it if it exists.

Parameters:

file (Path) – File to create.

common.file_system_utils.create_folders_if_necessary(paths)[source]

Create each directory in paths if it does not already exist.

Parameters:

paths (list[Path]) – Directories to create.

Return type:

None

common.file_system_utils.delete_dir(dir)[source]

Delete the directory dir recursively.

Parameters:

dir (str | Path) – Directory to delete.