from_file_path method

On this page

from_file_path

Extracts file extension and maps it to a file type.

def from_file_path(cls, file_path):
    ...
Parameter Type Description
file_path str The file name or file path.

Returns: FileType: The detected file type if supported; otherwise returns FileType.unknown.

See Also

On this page