Dir
Dir
Bases: BaseModel
Utility class for a directory.
Source code in src/task2md/util/dir.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
__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
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |