Click or drag to resize

FileSpec.Path Property

X#
A string representing the path defined to this file specification.

Namespace:  VO
Assembly:  VOSystemClasses (in VOSystemClasses.dll) Version: 2.21
Syntax
 VIRTUAL PROPERTY Path AS USUAL GET SET 
Request Example View Source

Property Value

Type: Usual
A string representing the path defined to this file specification.
Remarks
A string representing the path defined to this file specification. The path may have been assigned explicitly or as part of a longer file specification (assigned either as an instantiation parameter or as part of a file name or full path assignment). When accessing FileSpec:Path, the requested path is returned with a leading slash and when applicable a trailing slash. When assigning FileSpec:Path, you can specify a path with or without leading or trailing slashes. To specify the root, assign a single slash. Assigning a NULL_STRING (or NIL) to the drive means that the drive is unknown or unspecified; the various functions and objects that use the file specification to locate the file looks on whatever default drive would apply if a file name without a drive is specified. Assigning a value to the path normally does not affect the drive, file name, or extension. If a drive is included in the path, it is assigned to the path.
Examples
Here are some examples of strings that are returned by FileSpec:Path, with an explanation of what they indicate:
X#
1\data\customer                    // Path is \data\customer
2\                            // Path is ROOT
3<EmptyString>                    // Path unknown
Here are some examples of assigning strings to FileSpec:Path, with an explanation of the results:
X#
 1oFS:Path := NIL                // Unknown
 2oFS:Path := ""                // Unknown
 3oFS:Path := "\"                // Root
 4oFS:Path := "data"            // \data
 5oFS:Path := "\data"            // \data
 6oFS:Path := "data\"            // \data
 7oFS:Path := "\data"            // \data
 8oFS:Path := "data\cust"        // \data\CUST
 9oFS:Path := "\data\cust"        // \data\CUST
10oFS:Path := "d:data"            // Drive = d:
11// Path = \data
12oFS:Path := "d:\data"            // Drive = d:
13// Path = \data
14oFS:Path := "d:\"            // Drive = d:
15// Path = root
16oFS:Path := "d:"                // Drive = d:
17// Path = root
See Also