ibllib.io.misc
Functions
delete_empty_folders Will delete empty folders inside path, if recursive is set to True will delete all empty folders recusively untill all folders have a file inside recursive is ignored if dry==True |
- delete_empty_folders(path, rglob_pattern='*', dry=True, recursive=False)[source]
delete_empty_folders Will delete empty folders inside path, if recursive is set to True will delete all empty folders recusively untill all folders have a file inside recursive is ignored if dry==True
- Parameters:
path (str or pathlib.Path) – path to check for empty folders
rglob_pattern (str, optional) – filter on folder names, defaults to ‘*’
dry (bool, optional) – dry run will simulate the action, defaults to True
recursive (bool, optional) – whether to recurse after the last level of empty folders is deleted, defaults to False
- Returns:
[description]
- Return type:
[type]