remove_path
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| MacOSRemovePathCommand anyenv.os_commands.remove_path macOS remove path command implementation. |
||
| UnixRemovePathCommand anyenv.os_commands.remove_path Unix/Linux remove path command implementation. |
||
| WindowsRemovePathCommand anyenv.os_commands.remove_path Windows remove path command implementation. |
🛈 DocStrings¶
Remove path command implementations for different operating systems.
MacOSRemovePathCommand
¶
Bases: RemovePathCommand
macOS remove path command implementation.
Source code in src/anyenv/os_commands/remove_path.py
create_command
¶
Generate rm command (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to remove |
required |
recursive
|
bool
|
Whether to remove directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The rm command string |
Source code in src/anyenv/os_commands/remove_path.py
parse_command
¶
Parse rm 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 path was removed successfully, False otherwise |
Source code in src/anyenv/os_commands/remove_path.py
UnixRemovePathCommand
¶
Bases: RemovePathCommand
Unix/Linux remove path command implementation.
Source code in src/anyenv/os_commands/remove_path.py
create_command
¶
Generate Unix rm command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to remove |
required |
recursive
|
bool
|
Whether to remove directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The rm command string |
Source code in src/anyenv/os_commands/remove_path.py
parse_command
¶
Parse Unix rm 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 path was removed successfully, False otherwise |
Source code in src/anyenv/os_commands/remove_path.py
WindowsRemovePathCommand
¶
Bases: RemovePathCommand
Windows remove path command implementation.
Source code in src/anyenv/os_commands/remove_path.py
create_command
¶
Generate Windows removal command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to remove |
required |
recursive
|
bool
|
Whether to remove directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The removal command string |
Source code in src/anyenv/os_commands/remove_path.py
parse_command
¶
Parse Windows removal 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 path was removed successfully, False otherwise |