OSCommandProvider
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| UnixCommandProvider anyenv.os_commands.providers Unix/Linux command provider using GNU/POSIX tools. |
||
| MacOSCommandProvider anyenv.os_commands.providers macOS command provider using BSD tools. |
||
| WindowsCommandProvider anyenv.os_commands.providers Windows command provider using PowerShell and CMD. |
🛈 DocStrings¶
Base class for OS-specific command providers using command classes.
Source code in src/anyenv/os_commands/providers.py
__init__
¶
Initialize the command provider with command instances.
Source code in src/anyenv/os_commands/providers.py
get_command
¶
get_command(command_type: Literal['list_directory']) -> ListDirectoryCommand
get_command(command_type: Literal['file_info']) -> FileInfoCommand
get_command(command_type: Literal['exists']) -> ExistsCommand
get_command(command_type: Literal['is_file']) -> IsFileCommand
get_command(command_type: Literal['is_directory']) -> IsDirectoryCommand
get_command(command_type: Literal['create_directory']) -> CreateDirectoryCommand
get_command(command_type: Literal['remove_path']) -> RemovePathCommand
get_command(command_type: Literal['copy_path']) -> CopyPathCommand
get_command(command_type: Literal['base64_encode']) -> Base64EncodeCommand
get_command(command_type: Literal['which']) -> WhichCommand
get_command(command_type: Literal['pwd']) -> PwdCommand
get_command(command_type: Literal['env_var']) -> EnvVarCommand
get_command(command_type: Literal['find']) -> FindCommand
get_command(
command_type: CommandType,
) -> (
ListDirectoryCommand
| FileInfoCommand
| ExistsCommand
| IsFileCommand
| IsDirectoryCommand
| CreateDirectoryCommand
| RemovePathCommand
| CopyPathCommand
| Base64EncodeCommand
| WhichCommand
| PwdCommand
| EnvVarCommand
| FindCommand
)
Get command instance by type.