Skip to content

WindowsCommandProvider

Base classes

Name Children Inherits
OSCommandProvider
anyenv.os_commands.providers
Base class for OS-specific command providers using command classes.

⋔ Inheritance diagram

graph TD
  1141446949["providers.WindowsCommandProvider"]
  3219521113["providers.OSCommandProvider"]
  2751680898["builtins.object"]
  3219521113 --> 1141446949
  2751680898 --> 3219521113

🛈 DocStrings

Bases: OSCommandProvider

Windows command provider using PowerShell and CMD.

Source code in src/anyenv/os_commands/providers.py
class WindowsCommandProvider(OSCommandProvider):
    """Windows command provider using PowerShell and CMD."""

    def __init__(self) -> None:
        """Initialize Windows command provider with Windows command instances."""
        super().__init__()
        self.commands = {
            "list_directory": WindowsListDirectoryCommand(),
            "file_info": WindowsFileInfoCommand(),
            "exists": WindowsExistsCommand(),
            "is_file": WindowsIsFileCommand(),
            "is_directory": WindowsIsDirectoryCommand(),
            "create_directory": WindowsCreateDirectoryCommand(),
            "remove_path": WindowsRemovePathCommand(),
            "copy_path": WindowsCopyPathCommand(),
            "base64_encode": WindowsBase64EncodeCommand(),
            "which": WindowsWhichCommand(),
            "pwd": WindowsPwdCommand(),
            "env_var": WindowsEnvVarCommand(),
            "find": WindowsFindCommand(),
        }

__init__

__init__() -> None

Initialize Windows command provider with Windows command instances.

Source code in src/anyenv/os_commands/providers.py
def __init__(self) -> None:
    """Initialize Windows command provider with Windows command instances."""
    super().__init__()
    self.commands = {
        "list_directory": WindowsListDirectoryCommand(),
        "file_info": WindowsFileInfoCommand(),
        "exists": WindowsExistsCommand(),
        "is_file": WindowsIsFileCommand(),
        "is_directory": WindowsIsDirectoryCommand(),
        "create_directory": WindowsCreateDirectoryCommand(),
        "remove_path": WindowsRemovePathCommand(),
        "copy_path": WindowsCopyPathCommand(),
        "base64_encode": WindowsBase64EncodeCommand(),
        "which": WindowsWhichCommand(),
        "pwd": WindowsPwdCommand(),
        "env_var": WindowsEnvVarCommand(),
        "find": WindowsFindCommand(),
    }

:fa-brands-github: Show source on GitHub