create_directory
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| MacOSCreateDirectoryCommand anyenv.os_commands.create_directory macOS create directory command implementation. |
||
| UnixCreateDirectoryCommand anyenv.os_commands.create_directory Unix/Linux create directory command implementation. |
||
| WindowsCreateDirectoryCommand anyenv.os_commands.create_directory Windows create directory command implementation. |
🛈 DocStrings¶
Create directory command implementations for different operating systems.
MacOSCreateDirectoryCommand
¶
Bases: CreateDirectoryCommand
macOS create directory command implementation.
Source code in src/anyenv/os_commands/create_directory.py
create_command
¶
Generate mkdir command (same as Unix).
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 mkdir result based on exit code (same as Unix).
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 |
Source code in src/anyenv/os_commands/create_directory.py
UnixCreateDirectoryCommand
¶
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 |
Source code in src/anyenv/os_commands/create_directory.py
WindowsCreateDirectoryCommand
¶
Bases: CreateDirectoryCommand
Windows create directory command implementation.
Source code in src/anyenv/os_commands/create_directory.py
create_command
¶
Generate Windows directory creation 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 directory creation command string |
Source code in src/anyenv/os_commands/create_directory.py
parse_command
¶
Parse Windows directory creation result.
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 |