Skip to content

ListDirectoryCommand

Sub classes

Name Children Inherits
UnixListDirectoryCommand
anyenv.os_commands.list_directory
Unix/Linux list directory command implementation.
    MacOSListDirectoryCommand
    anyenv.os_commands.list_directory
    macOS list directory command implementation.
      WindowsListDirectoryCommand
      anyenv.os_commands.list_directory
      Windows list directory 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
          4141724308["base.ListDirectoryCommand"]
          925645236["abc.ABC"]
          2751680898["builtins.object"]
          925645236 --> 4141724308
          2751680898 --> 925645236

        🛈 DocStrings

        Bases: ABC

        Base class for list directory commands.

        Source code in src/anyenv/os_commands/base.py
        class ListDirectoryCommand(ABC):
            """Base class for list directory commands."""
        
            @abstractmethod
            def create_command(self, path: str = "") -> str:
                """Generate directory listing command."""
        
            @abstractmethod
            def parse_command(self, output: str, path: str = "") -> list[DirectoryEntry]:
                """Parse directory listing output."""
        

        create_command abstractmethod

        create_command(path: str = '') -> str
        

        Generate directory listing command.

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

        parse_command abstractmethod

        parse_command(output: str, path: str = '') -> list[DirectoryEntry]
        

        Parse directory listing output.

        Source code in src/anyenv/os_commands/base.py
        @abstractmethod
        def parse_command(self, output: str, path: str = "") -> list[DirectoryEntry]:
            """Parse directory listing output."""
        

        :fa-brands-github: Show source on GitHub