supersolids.helper.get_path

Module Contents

Functions

get_path(dir_path, dir_name = 'movie', counting_format = '%03d', file_pattern = '')

Looks up all directories with matching dir_name

supersolids.helper.get_path.get_path(dir_path, dir_name='movie', counting_format='%03d', file_pattern='')

Looks up all directories with matching dir_name and counting format in dir_path. Gets the highest number and returns a path with dir_name counted one up (prevents colliding with old data).

Parameters
  • dir_path (pathlib.Path) – Path where to look for old directories (movie data)

  • dir_name (str) – General name of the directories without the counter

  • counting_format (str) – Format of counter of the directories

  • file_pattern (str) –

Returns

Path for the new directory (not colliding with old data)

Return type

Tuple[pathlib.Path, int, str, str]