paths
Class info¶
🛈 DocStrings¶
Path handling utilities for URI and filesystem operations.
guess_mime_type
¶
Guess MIME type from file path using stdlib.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
JoinablePathLike
|
Path to get MIME type for |
required |
Returns:
| Type | Description |
|---|---|
str
|
MIME type string, defaults to "application/octet-stream" if unknown |
Source code in src/llmling/utils/paths.py
is_ignorable_part
¶
Check if a path component should be ignored.
is_ignorable_path_component
¶
Check if a path component should be ignored.
Source code in src/llmling/utils/paths.py
normalize_path_components
¶
Normalize path components, resolving . and .. entries.
Source code in src/llmling/utils/paths.py
path_to_uri
¶
Convert a path to a file URI with proper encoding.
Source code in src/llmling/utils/paths.py
uri_to_path
¶
Convert a file URI to a normalized path.