FileSpec Class |
Namespace: VO
The FileSpec type exposes the following members.
Name | Description | |
---|---|---|
Attributes |
One or more of the following characters concatenated into a string, indicating the attributes of the file represented by this file specification:
| |
DateChanged |
A date value denoting when the file was created or last changed. If the file is not found, NULL_DATE is returned.
| |
Drive |
A string representing the drive defined to this file specification.
| |
ErrInfo | Return the error object from the last Copy() or Move() operation. | |
Extension |
A string representing the extension defined to this file specification.
| |
FileName |
A string representing the file name defined to this file specification.
| |
FullPath |
A string representing the full path name defined to this file specification.
| |
Path |
A string representing the path defined to this file specification.
| |
Size |
A numeric value representing the size, in bytes, of the file represented by this file specification.
| |
TimeChanged |
A string indicating the time when the file was created or last changed.
|
Name | Description | |
---|---|---|
AppendToPath |
Append a subdirectory to the end of this file specification's path.
| |
Copy |
Make a copy of the file represented by this file specification.
| |
Delete |
Delete the file represented by this file specification.
| |
Error |
Provide a method for handling error conditions raised during FileSpec processing. This is an event handler: it is automatically called by other methods; the developer does not normally need to call the error method, but might want to replace or amend it.
| |
Find |
Search the disk for the file represented by this file specification, indicate if it exists, and if so, store its full path information in this file specification for future reference.
| |
Move |
Move the file represented by this file specification to a new location.
| |
PathUp |
Remove the last subdirectory from the end of this file specification's path.
| |
Rename |
Rename the file represented by this file specification.
|
1// Source file 2oFSSource := FileSpec{"c:\data\customer"} 3// For the target file, use path of source file 4oFSTarget := FileSpec{oFSSource:FullPath} 5// Change file name for target file 6oFSTarget:FileName := "nycust" 7// Open source file in server object 8oDBSource := DBServer{oFSSource} 9// Copy records to target file 10oDBSource:CopyDB(oFSTarget,,{||STATE="NY"})
1oFileSpec := FileSpec{} 2oFileSpec:Path := CurDir() 3oFileSpec:AppendToPath("data") 4oFileSpec:FileName := "custdata" 5oDB := DBServer{oFileSpec}