Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixFile Functions (continued)

AddPathDelimiter Function

Overview

The AddPathDelimiter function tests if a string containing a path has a trailing delimiter and if not adds it.

Syntax/Parameters

Syntax

string = AddPathDelimiter ( string path, [string delimiter] );

Parameters

path

A string containing a full or partial path with or without a trailing path delimiter.

delimiter

A string to use as a delimiter. The string can contain only a single character.

Return Value

Returns a string containing a path with a trailing delimiter or an empty string on failure. Use the GetLastError function to retrieve error information.

Remarks

The AddPathDelimiter function can be used to ensure that a path has a trailing path delimiter. This is useful when manually concatenating paths. The function operates with both forward or backslashes. If no delimiter is provided, the function will find the first slash within the path parameter and use it as a type. If the function cannot determine the type of delimiter to use and none is provided, an error will occur.

Related Functions

Platform Support

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

Legato IDE, Legato Basic