FolderItem.IsFolder

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aFolderItem.IsFolder

New in 2019r2

Supported for all project types and targets.

True if the FolderItem is a folder/directory).

Example

Prompt the user to choose a folder and then display the number of files it contains:

Var f As FolderItem
f = FolderItem.ShowSelectFolderDialog

If f.IsFolder Then
MessageBox("The folder has " + f.Count.ToString + " files.")
Else
MessageBox("The folderitem is not a folder!")
End If

This code checks for a specific folder on the drive:

Var f As FolderItem
f = New FolderItem("Resources")
If f <> Nil And f.Exists And f.IsFolder Then
// The folder exists so fetch a file from it
Var file As FolderItem = f.Child("sample.html")
End If