UnixIsDirectoryCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| IsDirectoryCommand anyenv.os_commands.base Base class for is directory commands. |
⋔ Inheritance diagram¶
graph TD
1573656440["is_directory.UnixIsDirectoryCommand"]
1344897377["base.IsDirectoryCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
1344897377 --> 1573656440
925645236 --> 1344897377
2751680898 --> 925645236
🛈 DocStrings¶
Bases: IsDirectoryCommand
Unix/Linux is directory command implementation.
Source code in src/anyenv/os_commands/is_directory.py
create_command
¶
Generate Unix test -d command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to test if it's a directory |
required |
Returns:
| Type | Description |
|---|---|
str
|
The test command string |
parse_command
¶
Parse Unix test -d result based on exit code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output (ignored) |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
bool
|
True if path is a directory, False otherwise |