Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SixFile Functions (continued)

QualifyURL Function

Overview

The QualifyURL function qualifies the path in the target string with the base string.

Syntax/Parameters

Syntax

string = QualifyURL ( string base, string target );

Parameters

base

A string containing a base path. The path does not require a trailing slash. base should generally be qualified but it is not required.

target

A string containing an unqualified target path. It cannot contain a root position but may contain one or more leading ‘../’ to perform up branch traversing.

Return Value

Returns a string containing the combined paths or an empty string on failure. Use the GetLastError function to retrieve error information.

Remarks

The QualifyURL function take two input paths and combines them to produce a resultant path. The second path (target) must be relative to the first (base) (i.e., within the same logical volume). The QualifyURL function also performs path connector logic to properly resolve ‘..’ connectors to traverse up the path tree. The paths can be Windows or URI style.

In the event of an error, the GetLastError function may return the following bitwise values mixed with ERROR_SOFT:

  Define   Bitwise Value   Description
  AP_SOURCE_NOT_RELATIVE   0x00010000   Source is Not Relative Path
  AP_SOURCE_SYNTAX   0x00020000   Syntax Error Relative Path
  AP_SOURCE_EXCEEDS_ROOT   0x00040000   Up Tree '..' Went Passed Root
  AP_OVERFLOW   0x00080000   Result is to Large (MAX_PATH_SIZE)
  QU_ABS_PATH_SPECIFIED   0x00000100   Absolute Path was Specified
  QU_ROOT_SPECIFIED   0x00000200   Source was Root ("/dog...")
  QU_RELATIVE   0x00000400   Source was Relative
  QU_NAME_APPEND   0x00001000   Appended Name to Path
  QU_ERROR   0x00004000   Error in Path
  QU_NO_PATH_BASIS   0x00008000   No Basis for Path (error)

 

Related Functions

Platform Support

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

Legato IDE, Legato Basic