copy_path
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| MacOSCopyPathCommand anyenv.os_commands.copy_path macOS copy path command implementation. |
||
| UnixCopyPathCommand anyenv.os_commands.copy_path Unix/Linux copy path command implementation. |
||
| WindowsCopyPathCommand anyenv.os_commands.copy_path Windows copy path command implementation. |
🛈 DocStrings¶
Copy path command implementations for different operating systems.
MacOSCopyPathCommand
¶
Bases: CopyPathCommand
macOS copy path command implementation.
Source code in src/anyenv/os_commands/copy_path.py
create_command
¶
Generate cp command (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source path to copy from |
required |
destination
|
str
|
Destination path to copy to |
required |
recursive
|
bool
|
Whether to copy directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The cp command string |
Source code in src/anyenv/os_commands/copy_path.py
parse_command
¶
Parse cp 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 copy was successful, False otherwise |
Source code in src/anyenv/os_commands/copy_path.py
UnixCopyPathCommand
¶
Bases: CopyPathCommand
Unix/Linux copy path command implementation.
Source code in src/anyenv/os_commands/copy_path.py
create_command
¶
Generate Unix cp command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source path to copy from |
required |
destination
|
str
|
Destination path to copy to |
required |
recursive
|
bool
|
Whether to copy directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The cp command string |
Source code in src/anyenv/os_commands/copy_path.py
parse_command
¶
Parse Unix cp 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 copy was successful, False otherwise |
Source code in src/anyenv/os_commands/copy_path.py
WindowsCopyPathCommand
¶
Bases: CopyPathCommand
Windows copy path command implementation.
Source code in src/anyenv/os_commands/copy_path.py
create_command
¶
Generate Windows copy command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source path to copy from |
required |
destination
|
str
|
Destination path to copy to |
required |
recursive
|
bool
|
Whether to copy directories recursively |
False
|
Returns:
| Type | Description |
|---|---|
str
|
The copy command string |
Source code in src/anyenv/os_commands/copy_path.py
parse_command
¶
Parse Windows copy 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 copy was successful, False otherwise |