Difference between revisions of "FolderItem.Children"

From Xojo Documentation

(Created page with "N/A")
 
m
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
N/A
+
{{MethodBox
 +
| name=Children
 +
| owner=[[FolderItem]]
 +
| ownertype=class
 +
| scope=public
 +
| parameters=followAlias as [[Boolean]] = True
 +
| returntype=[[Iterable]]
 +
| platform=all
 +
| newinversion=2019r2
 +
}}
 +
{{Description
 +
|text = Allows you to iterate through all the files in a folder.}}
 +
 
 +
==Examples==
 +
This example adds the names of all the files on the desktop to a listbox:
 +
<rbcode>
 +
Var DesktopFiles As FolderItem = SpecialFolder.Desktop
 +
For Each file As FolderItem In DesktopFiles.Children
 +
  Listbox1.AddRow(file.Name)
 +
Next
 +
</rbcode>
 +
 
 +
[[Category:API 2.0]]

Latest revision as of 20:43, 3 December 2019

Method

FolderItem.Children(followAlias as Boolean = True) As Iterable

New in 2019r2

Supported for all project types and targets.

Allows you to iterate through all the files in a folder.

Examples

This example adds the names of all the files on the desktop to a listbox:

Var DesktopFiles As FolderItem = SpecialFolder.Desktop
For Each file As FolderItem In DesktopFiles.Children
Listbox1.AddRow(file.Name)
Next