Nov-13-2018, 08:39 PM
glob will work fine in this application.
Pathlib, using file objects offers things not found with glob.
for example:
list(filename.parents)
or
if filename.exists():
or for directory paths
dirname.mkdir(exist_ok=True)
which will create a directory if it doesn't already exist.
Pathlib, using file objects offers things not found with glob.
for example:
list(filename.parents)
or
if filename.exists():
or for directory paths
dirname.mkdir(exist_ok=True)
which will create a directory if it doesn't already exist.