duat-filetype

Filetypes for the Duat text editor
This Plugin is included by default, as it is considered a core
utility of duat. It adds the two following traits:
FileType: This trait grants thefiletypemethod, which lets you access the filetype directly. Its implementors are theBufferwidget,Stringand&strandPathBufandPath.PassFileType: This trait also has afiletypemethod, but it requires aPass, bypassing the need to, for example,readaHandle<Buffer>. Its implementors areRwData<Buffer>,Handle<Buffer>,
Both of these traits are included by default in Duat’s
prelude, but if you want to use them in a plugin, first, add
duat-filetype to the dependencies:
Or, for latest git version:
Then, just use it in the file:
use FileType;