Crate tft

Source
Expand description

§tft

Text file type list and detection similar to that of Neovim

Note: If viewing this file on GitHub or crates.io, some links might not be working. Go to the docs.rs page instead, which also additionally includes the Features section.

§Overview

tft mainly provides the FileType enum and the detect and try_detect functions. Follow these links for more information.

§Features

Enums§

FileType
A non-exhaustive list of text file types.

Functions§

detectdetect
Same as try_detect but automatically falling back to FileType::Text where try_detect would return None.
try_detectdetect
Try to detect a FileType given a file’s path and content.