This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
folder.files( )
|
folder.files ( {options} ) -> Result | ||||||||
Parameter | Type | Description | ||||||
options | Longint |
![]() |
File list options | |||||
Result | Collection |
![]() |
Collection of children file objects | |||||
The folder.files( ) method returns a collection of File objects contained in the folder.
Note: Aliases or symbolic links are not resolved.
By default, if you omit the options parameter, only the files at the first level of the folder are returned in the collection. You can modify this by passing, in the options parameter, one or more of the following constants:
Constant | Value | Comment |
fk recursive | 1 | The collection contains files or folders of the specified folder and its subfolders. |
fk ignore invisible | 8 | Invisible files or folders are not listed |
Returned value
Collection of File objects.
You want to know if there are invisible files in the Database folder:
C_COLLECTION($all;$noInvisible)
$all:=Folder(fk database folder).files()
$noInvisible:=Folder(fk database folder).files(fk ignore invisible)
If($all.length#$noInvisible.length)
ALERT("Database folder contains hidden files.")
End if
You want to get all files that are not invisible in the Documents folder:
C_COLLECTION($recursive)
$recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible)
Product: 4D
Theme: File and Folder
Created: 4D v17 R5
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)