Harbour Reference Guide

 

FILE()

Tests for the existence of file(s)

Syntax

FILE( <cFileSpec> ) --> lExists

Arguments

<cFileSpec> Dos Skeleton or file name to find.

Returns

<lExists> a logical true (.T.) if the file exists or logical false (.F.).

Description

This function return a logical true (.T.) if the given filename <cFileSpec> exist.

Dos skeletons symbols may be used in the filename in <cFileSpec>, as may the drive and/or path name. If a drive are not explicity specified,FILE() will first search the current drive and directory, and will look for the file in the directories specified by SET PATH TO and SET DEFAULT TO commands.However, this command does not look at the values in the DOS PATH command.
Examples
      ? file('c:\harbour\doc\compiler.txt")
      ? file('c:/harbour/doc/subcodes.txt")
Status

Ready

Compliance

This function is CA-Clipper compatible.

Files

Library is Rtl

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30