Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixFile Functions (continued)

EnumeratePlaces Function

Overview

The EnumeratePlaces function returns a table of available places on the client computer.

Syntax/Parameters

Syntax

string [][] = EnumeratePlaces ( [string items], [dword flags] );

Parameters

items

An optional string containing codes for places. Places are enumerated in the order of the string. the default value is VCNT, for VFC, Computer, Network Host Names and Terminal Services Redirect.

flags

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

  Defines   Bitwise   Description  
  FOLDER_LOAD_PLACES_GROUP   0x00000001   Adds the grouping name tot he returned list. If there are no items in the group, the group header is not added.  
  FOLDER_LOAD_PLACES_SPACER   0x00000002   Adds a blank record between the end of each group and the start of the next.  

  

Return Value

Returns a string table of places names and data or an empty array on failure. Use the GetLastError function to retrieve error information.

The return filename values will be UTF-8 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.

Places are the shorthand access for drives, networks and other information. The table will contain the following column keys:

  Key Name   Description  
  name   Name of the place. This does not always apply. For example, drive letters have volume names, network hosts do not.  
  d_path   Display path.  
  f_path   Full path. Note for network UNCs this will be the host name.  
  p_type   A hex string containing the 32-bit entry place flags.  
  f_type   A hex string containing the 32-bit file type 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