gpf_entrepot_toolbelt.utils.os_utils module

gpf_entrepot_toolbelt.utils.os_utils.convert_to_bytes(size_str: str)

Converts a size string to bytes.

Paramètres:

size_str (str) – Size string (e.g. « 10MB »)

Renvoie:

Size in bytes

Type renvoyé:

int

Create symbolic links.

Paramètres:
  • elements (Iterable[Path]) – elements to add to the virtual folder

  • target_dir (Path) – virtual folder to create and add elements to

  • add_parent_as_suffix (bool) – adds the parent folder of a file to its symlink name as a suffix

gpf_entrepot_toolbelt.utils.os_utils.remove_path(path: Path)

Removes a file or a directory.

Paramètres:

path (Path) – Path to the file or directory to remove

Renvoie:

None