FileSpec.Drive Property | |
A string representing the drive defined to this file specification.
Namespace:
VO
Assembly:
VOSystemClasses (in VOSystemClasses.dll) Version: 2.19
Syntax VIRTUAL PROPERTY Drive AS USUAL GET SET
public virtual Usual Drive { get; set; }
Request Example
View SourceProperty Value
Type:
UsualA string representing the drive defined to this file specification.
Remarks
A string representing the drive defined to this file specification. The drive may have been assigned explicitly or as part of a longer file specification (assigned either as an instantiation parameter or as part of the file name or full path).
When accessing FileSpec:Drive, the requested drive is returned with a trailing colon.
When assigning FileSpec:Drive, you can specify a drive with or without a colon. 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.
Examples
To copy selected records from a file from one disk drive to another — using the same file name and directory — you could do this:
1
2oFSSource := FileSpec{"c:\data\customer"}
3
4oFSTarget := FileSpec{oFSSource:FullPath}
5
6oFSTarget:Drive := "d"
7
8oDBSource := DBServer{oFSSource}
9
10oDBSource:CopyDB(oFSTarget,,{||STATE="NY"})
See Also