Dir
Dir
Bases: BaseModel
Utility class for a directory.
Source code in src/task2md/util/dir.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
__init__(dir_path=None, create=False)
Constructor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dir_path |
Path | None
|
Directory file path. Current working directory if None. |
None
|
create |
bool
|
Create directory if doesn't exist. Defaults to False. |
False
|
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
When create is False and directory not found. |
Source code in src/task2md/util/dir.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |