macpie.pathtools.create_subdir#
- macpie.pathtools.create_subdir(subdir_name: str, where=PosixPath('.'), exists_ok=False)#
Creates a sub directory with the current date/time appended to the directory name.
>>> from pathlib import Path >>> results_dir = pathtools.create_subdir(Path('.'), "results") >>> results_dir PosixPath('results_20210521_162611')
- Parameters:
output_dir – Directory in which to create the new directory. Defaults to None, which will use the current directory.
output_dir_name – Name of the new directory. Defaults to None, which will use “new_folder”.