MacOSIsFileCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| IsFileCommand anyenv.os_commands.base Base class for is file commands. |
⋔ Inheritance diagram¶
graph TD
2404115209["is_file.MacOSIsFileCommand"]
153617120["base.IsFileCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
153617120 --> 2404115209
925645236 --> 153617120
2751680898 --> 925645236
🛈 DocStrings¶
Bases: IsFileCommand
macOS is file command implementation.
Source code in src/anyenv/os_commands/is_file.py
create_command
¶
Generate test -f command (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to test if it's a file |
required |
Returns:
| Type | Description |
|---|---|
str
|
The test command string |
parse_command
¶
Parse test -f result based on exit code (same as Unix).
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 file, False otherwise |