Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixFile Functions (continued)

GetNextFile Function

Overview

The GetNextFile function retrieves the next item within a Folder Enumeration Object as created by the GetFirstFile function.

Syntax/Parameters

Syntax

int = GetNextFile ( handle hFolderEnum );

Parameters

hFolderEnum

A handle to a valid Folder Enumeration Object as created with the GetFirstFile function.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure. If all the entries are exhausted, the return value will be ERROR_EOD. Use the GetLastError function to retrieve error information.

Remarks

The properties of the item in the Folder Enumeration Object can be retrieved with functions such as the GetFilename and GetFileSize functions. The operation of the GetNextFile function cannot be unwound. To retrieve the information of previous entries, the GetFirstFile function must be called again to reset the items.

If the hFolderEnum parameter is invalid, the GetLastError function will return ERROR_INVALID_HANDLE.

Related Functions

Platform Support

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

Legato IDE, Legato Basic