pyslk.makedirs

Contents

pyslk.makedirs#

pyslk.makedirs(gns_path: str | Path, exist_ok: bool = False) int#

Create a directory like ‘mkdir()’ but create parent directories recursively, if they do not exist

If exist_ok is False (the default), a FileExistsError is raised if the target directory already exists.

Parameters:
  • gns_path (str or Path) – gns path to create

  • exist_ok (bool) – throw no error if folder already exists (like ‘mkdir -p’)

Returns:

namespace/resource id of the created namespace

Return type:

int

See also