Click or drag to resize

FileSpec.Find Method

X#
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.

Namespace:  VO
Assembly:  VOSystemClasses (in VOSystemClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Find() AS USUAL
Request Example View Source

Return Value

Type: Usual
TRUE if the file was found; otherwise, FALSE.
Remarks
This method searches for the file subject to all the standard settings of the SetPath() and SetDefault() functions. If the file is found, its full path information is stored for future reference, which is useful since the initial search starts from the current directory and the same file can later be used in a DBServer, for example, when the current directory may not be the same.
Examples
The following example, part of a method in a hypothetical data window, defines a generic file, searches for it, and then displays its full path if found:
X#
1oFileSpec := FileSpec{"custfile"}
2IF oFileSpec:Find()
3SELF:Caption := oFileSpec:FullPath d:\data\custfile.dbf
4...
5SELF:Use(DBServer{oFileSpec})
6ENDIF
See Also