GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Six — File Functions (continued)
EnumerateFolderDetails Function
Overview
The EnumerateFolderDetails function returns a table folder and file names with basic details about each entry using a specified path and wildcard mask. It can optionally recursively search folders.
Syntax/Parameters
Syntax
string [][] = EnumerateFolderDetails ( 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 table of file and folder names, details and relative paths as appropriate or an empty array on failure. Use the GetLastError function to retrieve error information.
The return filename values will be UTF encoded for filenames with Unicode characters.
Remarks
Because an empty table could indicate both and 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.
The table will contain the following column keys:
Key Name | Description | |||
Name | Filename and path, relative to the function path parameter. | |||
AttributeBits | A hex string containing the 32-bit binary attribute bits. See GetFileAttributeString for additional information. | |||
Attributes | A formatted string containing entry attributes. See GetFileAttributeString for additional information. | |||
CreateTime | The creation time in ISO-8601 as UTC. | |||
CreateFileTime | A hex string containing the 64-bit file create time value. See GetFileCreateTime for additional information. | |||
AccessTime | The last access time in ISO-8601 as UTC. | |||
AccessFileTime | A hex string containing the 64-bit file access time value. | |||
ModifiedTime | The last write time in ISO-8601 as UTC. | |||
ModifiedFileTime | A hex string containing the 64-bit file write time value. See GetFileModifiedTime for additional information. | |||
Size | The file size in formatted binary unit types. See IntegerToBinaryUnits for additional information. | |||
Bytes | A decimal string of the 64-bit byte value. |
Note that when recursion is enabled, the function can consume a fair amount of time loading the table and the resulting table can be rather large. For example, enumerating the windows directory and all its folders can take more than a minute.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.