FolderItem.Type

From Xojo Documentation

Read-Only Property (As String )
StringValue = aFolderItem.Type

Supported for all project types and targets.

If the FolderItem is not a folder, this property contains the file type of the FolderItem. If the FolderItem is a folder (macOS), it will return a matching file type if you have created one. The file types must be defined in your project. If not, this property will be empty.

Notes

This property only contains a type if you open a file for which there is a corresponding File Type Set.

Example

If the standard "text/plain" file type been added to a File Type Set, then this gets the type:

Var f As FolderItem = GetFolderItem("test.txt")
// f.Type has a value if there is a File Type Set configured for ".txt" files
// "text/plain" if available in a File Type Set