home *** CD-ROM | disk | FTP | other *** search
- { Unit EXIST - Test Existance of 'Filename' }
- { Copyright (C) 1990 RodentWare }
- { Michael Reece/James Calvert * 1:3801/42 }
-
- (*
- Example:
- If FileExist('CONFIG.SYS') then
- Writeln ('Configuration file found!')
- else
- Writeln('Configuration file missing!');
- *)
-
- Unit Exist;
-
- Interface
-
- Function FileExist(FileName:String):Boolean;
-
- Implementation
-
- Function FileExist(FileName:String):Boolean;
- Var F : File;
- Begin
- {$I-}
- Assign(F,FileName);
- Reset(F);
- Close(F);
- {$I+}
- FileExist:=(IOResult = 0) and (FileName <> '');
- End;
-
- End.