check_folder#

caf.van.utilities.check_folder(path, name, create=False)[source]#

Checks if given path is an existing folder.

Can create a new folder if it doesn’t already exist.

Parameters:
  • path (Path) – Path to check.

  • name (str) – Name used for error messages.

  • create (bool, optional) – Whether the folder should be created if it doesn’t already exist, by default False

Returns:

True if the folder already exists and False if the folder had to be created.

Return type:

bool

Raises: