Get file extension (lowercase, without dot). Args: path: File path Returns: File extension (e.g., 'pdf', 'md')
(path: Union[str, Path])
| 108 | |
| 109 | |
| 110 | def get_file_extension(path: Union[str, Path]) -> str: |
| 111 | """ |
| 112 | Get file extension (lowercase, without dot). |
| 113 | |
| 114 | Args: |
| 115 | path: File path |
| 116 | |
| 117 | Returns: |
| 118 | File extension (e.g., 'pdf', 'md') |
| 119 | """ |
| 120 | return Path(path).suffix.lower().lstrip(".") |
| 121 | |
| 122 | |
| 123 | def is_pdf(path: Union[str, Path]) -> bool: |
no outgoing calls
no test coverage detected