MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / get_file_extension

Function get_file_extension

autofigure/utils/file_utils.py:110–120  ·  view source on GitHub ↗

Get file extension (lowercase, without dot). Args: path: File path Returns: File extension (e.g., 'pdf', 'md')

(path: Union[str, Path])

Source from the content-addressed store, hash-verified

108
109
110def 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
123def is_pdf(path: Union[str, Path]) -> bool:

Callers 2

is_pdfFunction · 0.85
is_markdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected