woom.util.check_dir

Contents

woom.util.check_dir#

woom.util.check_dir(filepath, dry=False, logger=None)[source]#

Make sure that the directory that contains file exists

Parameters:
  • filepath (str) – File path

  • dry (bool) – Fake mode. Do not create the directory

  • logger (logging.Logger, optional) – To inform that we create the directory, even in dry mode

Returns:

Absolute file path

Return type:

str