FilePath¶
-
class
ostools.
FilePath
(path='.', exist_required=True, ensure=None, lazy=False)[source]¶ This is a class similar to
pathlib.Path
.-
ensure
¶ str
– Whether to create the file or directory automatically. Can be either ‘dir’, to make it a directory, or ‘file’ to make it a file. It will be created before theFilePath.exist_required
check. This can be modified manually.
-
lazy
¶ bool
– Whether or not to runFilePath.ensure
andFilePath.exist_required
checks when accessing or modifyingFilePath.path()
. This can be modified manually.
-