darf.src.io.directories module
Directory module
Use this module to handle directories
- class darf.src.io.directories.DirectoryHandler(path: str, create: bool = True)
Bases:
objectDirectoryHandler. Class used to manage directories
- classmethod check(path: str) bool
check. Function to check if the path provided is a directory
- Parameters:
path (str) – path
- Returns:
True if the directory exists
- Return type:
bool
- classmethod clear(path: str) None
clear. Function to clear the directory Removes all the files and directories in the path. recusively! Use with caution.
- Parameters:
path (str) – path
- Return type:
None
- property files: List[str]
Returns the list of files in the directory controlled. This would search recoursivly for files.
- Return type:
List[str]
- property path: str
path of the directory managed
- Returns:
the path to the directory
- Return type:
str