Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>file()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILE()
 Determine if files exist in the CA-Clipper default directory or path
------------------------------------------------------------------------------
 Syntax

     FILE(<cFilespec>) --> lExists

 Arguments

     <cFilespec> is in the current CA-Clipper default directory and path.
     It is a standard file specification that can include the wildcard
     characters * and ? as well as a drive and path reference.  Explicit
     references to a file must also include an extension.

 Returns

     FILE() returns true (.T.) if there is a match for any file matching the
     <cFilespec> pattern; otherwise, it returns false (.F.).

 Description

     FILE() is an environment function that determines whether any file
     matching a file specification pattern is found.  FILE() searches the
     specified directory if a path is explicitly specified.

     If a path is not specified,  FILE() searches the current CA-Clipper
     default directory and then the CA-Clipper path.  In no case is the DOS
     path searched.  Note also that FILE() does not recognize hidden or
     system files in its search.

 Examples

     .  In this example FILE() attempts to find Sales.dbf in other
        than the current CA-Clipper default:

        ? FILE("Sales.dbf")               // Result: .F.
        ? FILE("\APPS\DBF\Sales.dbf")     // Result: .T.
        //
        SET PATH TO \APPS\DBF
        ? FILE("Sales.dbf")               // Result: .T.
        //
        SET PATH TO
        SET DEFAULT TO \APPS\DBF\
        ? FILE("Sales.dbf")               // Result: .T.
        ? FILE("*.dbf")                   // Result: .T.

 Files:  Library is CLIPPER.LIB.

See Also: SET DEFAULT SET PATH

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson