FolderItem.Type

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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 = SpecialFolder.Desktop.Child("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