Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixFile Functions (continued)

EnumerateFolders Function

Overview

The EnumerateFolders function returns an array of folder names using a specified path and wildcard mask. Optionally, it can recursively search folders.

Syntax/Parameters

Syntax

string[] = EnumerateFolders ( string path, [dword flags] );

Parameters

path

A string containing a qualified path and optional wild card match. The path can contain a *.* or other matching wildcard pattern. If a wildcard is missing, the default is *.*.

flags

An optional dword specifying flags. If the parameter is omitted, the default is FOLDER_LOAD_NO_FOLDER_NAV.

  Defines   Bitwise   Description  
  Append Flags:          
    FOLDER_LOAD_RECURSE   0x00000001   Recurse into subdirectories  
    FOLDER_LOAD_FOLDER_TO_BRACKETS   0x00000002   Add brackets to directory names  
    FOLDER_LOAD_FOLDER_NAMES   0x00000004   Add folder names  
    FOLDER_LOAD_RECENT_30   0x00000008   Load only past 30 days  
    FOLDER_LOAD_NO_FOLDER_NAV   0x00000010   Skip the '.' and '..' entries  
    FOLDER_LOAD_NO_HIDDEN   0x00000020   Do not load hidden files  
    FOLDER_LOAD_NO_SYSTEM   0x00000040   Do not load system files  
    FOLDER_LOAD_CASE_SENSITIVE   0x00000080   Match case-sensitive  
    FOLDER_LOAD_MATCH_FOLDERS   0x00000100   Apply Mask to Folder Names  
  Files:        
    FOLDER_UTF_NAMES   0x00001000   Contain UTF coded name (Unicode)  
  Operation:        
    FOLDER_USE_PROGRESS   0x00100000   Use Legato's Progress Display  

  

Return Value

Returns a string array of folder names and relative paths as appropriate or an empty array on failure. Use the GetLastError function to retrieve error information.

The return values will be UTF encoded for filenames with Unicode characters.

Remarks

Because an empty array could indicate either an error or the lack of any matching result, the GetLastError function should be used to determine if an error occurred. This function does not enumerate file names. Use the EnumerateFiles function to enumerate matching filenames.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic