from_extension method

from_extension

Maps file extension to file type.

Returns

When file type is supported returns it, otherwise returns default FileType.Unknown file type.

def from_extension(self, extension):
    ...
Parameter Type Description
extension str File extension (including the period “.”).

Exceptions

Exception Description
ArgumentException Thrown when extension is null or empty string.

See Also