UnixCreateDirectoryCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| CreateDirectoryCommand anyenv.os_commands.base Base class for create directory commands. |
⋔ Inheritance diagram¶
graph TD
1250196185["create_directory.UnixCreateDirectoryCommand"]
2491271628["base.CreateDirectoryCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
2491271628 --> 1250196185
925645236 --> 2491271628
2751680898 --> 925645236
🛈 DocStrings¶
Bases: CreateDirectoryCommand
Unix/Linux create directory command implementation.
Source code in src/anyenv/os_commands/create_directory.py
create_command
¶
Generate Unix mkdir command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Directory path to create |
required |
parents
|
bool
|
Whether to create parent directories |
True
|
Returns:
| Type | Description |
|---|---|
str
|
The mkdir command string |
Source code in src/anyenv/os_commands/create_directory.py
parse_command
¶
Parse Unix mkdir result based on exit code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output (ignored) |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
bool
|
True if directory was created successfully, False otherwise |