MacOSListDirectoryCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ListDirectoryCommand anyenv.os_commands.base Base class for list directory commands. |
⋔ Inheritance diagram¶
graph TD
3725664569["list_directory.MacOSListDirectoryCommand"]
4141724308["base.ListDirectoryCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
4141724308 --> 3725664569
925645236 --> 4141724308
2751680898 --> 925645236
🛈 DocStrings¶
Bases: ListDirectoryCommand
macOS list directory command implementation.
Source code in src/anyenv/os_commands/list_directory.py
create_command
¶
Generate BSD ls command (no --time-style support).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Directory path to list |
''
|
Returns:
| Type | Description |
|---|---|
str
|
The ls command string |
Source code in src/anyenv/os_commands/list_directory.py
parse_command
¶
parse_command(output: str, path: str = '') -> list[DirectoryEntry]
Parse BSD ls output (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw ls command output |
required |
path
|
str
|
Base directory path |
''
|
Returns:
| Type | Description |
|---|---|
list[DirectoryEntry]
|
List of DirectoryEntry objects |