Click or drag to resize

FileSpec.AppendToPath Method (Typed)

X#
Append a subdirectory to the end of this file specification's path.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOSystemClasses (in XSharp.VOSystemClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD AppendToPath(
	cDirectory AS STRING
) AS STRING
Request Example View Source

Parameters

cDirectory
Type: String
The subdirectory to be appended, with or without leading and trailing slashes. A list of subdirectories separated by slashes can also be appended.

Return Value

Type: String
The resulting path.
Remarks
Tip Tip
If the path was previously unknown (NIL), cDirectory becomes the new path.
Examples
The following examples illustrate the use of FileSpec:AppendToPath():
X#
 1// d:\data\cust
 2oFS:Path := "d:\data"
 3oFS:AppendToPath("cust")
 4// d:\data\cust
 5oFS:Path := "d:\data"
 6oFS:AppendToPath("\cust\")
 7// \data
 8oFS:Path := "\"
 9oFS:AppendToPath("data")
10// \cust
11oFS:Path := NIL
12oFS:AppendToPath("cust")
13// d:\data\cust\1993\budget
14oFS:Path := "d:\data"
15oFS:AppendToPath("cust\1993\budget")
See Also