hbutils.system.filesystem

Overview:

Utilities for filesystem.

touch

hbutils.system.filesystem.touch(file: str, exist_ok: bool = True, makedirs: bool = True)[source]
Overview:

Touch the file at given path. Just like the touch command in unix system.

Parameters:
  • file – Path of the file.

  • exist_ok – Exist is okay or not.

  • makedirs – Create directories when necessary.

copy

hbutils.system.filesystem.copy(src, dst)[source]
Overview:

Copy a file or a directory from src to dst. src can be a file or a directory, both are supported.

From Stack Overflow - Copy file or directories recursively in Python.

Parameters:
  • src – Source path.

  • dst – Destination path.