Xojo.IO.FolderItem.Children

From Xojo Documentation

Method

Xojo.IO.FolderItem.Children(resolveAlias As Boolean = True) As Xojo.Core.Iterable

Supported for all project types and targets.

Returns an iterator which can be used with a For Each...Next loop to go through all the files in a folder.

Parameters

Value Description
resolveAlias If True and the child FolderItem returned points to an alias or shortcut, it will resolve to the actual file or folder.

Exceptions

Sample Code

Get all the files in the Documents folder and add their names to an array:

Using Xojo.IO
Var docs As FolderItem
docs = SpecialFolder.Documents

Var files() As Text
For Each f As FolderItem In docs.Children
files.AddRow(f.Name)
Next