Skip to content

ExistsCommand

Sub classes

Name Children Inherits
UnixExistsCommand
anyenv.os_commands.exists
Unix/Linux exists command implementation.
    MacOSExistsCommand
    anyenv.os_commands.exists
    macOS exists command implementation.
      WindowsExistsCommand
      anyenv.os_commands.exists
      Windows exists command implementation.

        Base classes

        Name Children Inherits
        ABC
        abc
        Helper class that provides a standard way to create an ABC using

        ⋔ Inheritance diagram

        graph TD
          1780788704["base.ExistsCommand"]
          925645236["abc.ABC"]
          2751680898["builtins.object"]
          925645236 --> 1780788704
          2751680898 --> 925645236

        🛈 DocStrings

        Bases: ABC

        Base class for exists commands.

        Source code in src/anyenv/os_commands/base.py
        class ExistsCommand(ABC):
            """Base class for exists commands."""
        
            @abstractmethod
            def create_command(self, path: str) -> str:
                """Generate exists test command."""
        
            @abstractmethod
            def parse_command(self, output: str, exit_code: int = 0) -> bool:
                """Parse exists test result."""
        

        create_command abstractmethod

        create_command(path: str) -> str
        

        Generate exists test command.

        Source code in src/anyenv/os_commands/base.py
        @abstractmethod
        def create_command(self, path: str) -> str:
            """Generate exists test command."""
        

        parse_command abstractmethod

        parse_command(output: str, exit_code: int = 0) -> bool
        

        Parse exists test result.

        Source code in src/anyenv/os_commands/base.py
        @abstractmethod
        def parse_command(self, output: str, exit_code: int = 0) -> bool:
            """Parse exists test result."""
        

        :fa-brands-github: Show source on GitHub