Reading the content of a folder

In a desktop application I’am using the following code to read the content of a folder.

Dim itemIdx, dirCount as Integer Dim dir, item as FolderItem dir = GetFolderItem("") dirCount = dir.Count For itemIdx = 1 to dirCount item = dir.Item(itemIdx) ' leest elk item uit de folder If item <> nil and Right(item.Name,4) = ".wkw" Then ' enkel de naam van het werkwoord tonen lstWerkwoorden.addrow Mid(item.name,4,Len(item.Name)-7) End If Next
How can I do the same thing in a iOS application?
I can’t find an example, provided by Xojo.

[code]//get a directory, like the app’s Documents location
Dim myDir As FolderItem = SpecialFolder.Documents

For Each myFile As FolderItem In myDir.Children
//whatever you want to do with each item (myFile) here
Next[/code]

[quote=154685:@Travis Hill]For Each myFile As FolderItem In myDir.Children
//whatever you want to do with each item (myFile) here
Next[/quote]

I was still trying to figure the iterator thing. This is quite simple.

Thank you Travis.

Thank you Travis. Works as expected.