getFileContentType

Detects the type of content stored in a file using a path.

Return

FileMetadata.FileContentType.Text for text files, FileMetadata.FileContentType.Binary for binary files.

Parameters

path

The path to a file whose content type is to be detected.

Throws

if the path doesn't exist or isn't a regular file.

IOException

if an I/O error occurs while detecting the file content type.