123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- {
- $Id$
- This file is part of the Free Pascal run time library.
- Copyright (c) 1998 by the Free Pascal development team
- File utility calls
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- **********************************************************************}
- {$ifndef win32}
- Type
- THandle = Longint; // Needed for TSearchRec
- {$endif}
- Type
- TSearchRec = Record
- Time,Size, Attr : Longint;
- Name : TFileName;
- ExcludeAttr : Longint;
- FindHandle : THandle;
- {$ifdef Win32}
- FindData : TWin32FindData;
- {$endif}
- end;
- Const
- faReadOnly = $00000001;
- faHidden = $00000002;
- faSysFile = $00000004;
- faVolumeId = $00000008;
- faDirectory = $00000010;
- faArchive = $00000020;
- faAnyFile = $0000003f;
-
- Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
- Function FileCreate (Const FileName : String) : Longint;
- Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
- Function FileWrite (Handle : Longint; Var Buffer; Count : Longint) : Longint;
- Function FileSeek (Handle,Offset,Origin : Longint) : Longint;
- Procedure FileClose (Handle : Longint);
- Function FileAge (Const FileName : String): Longint;
- Function FileExists (Const FileName : String) : Boolean;
- Function FindFirst (Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
- Function FindNext (Var Rslt : TSearchRec) : Longint;
- Procedure FindClose (Var F : TSearchrec);
- Function FileGetDate (Handle : Longint) : Longint;
- Function FileSetDate (Handle,Age : Longint) : Longint;
- Function FileGetAttr (Const FileName : String) : Longint;
- Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
- Function DeleteFile (Const FileName : String) : Boolean;
- Function RenameFile (Const OldName, NewName : String) : Boolean;
- Function FileSearch (Const Name, DirList : String) : String;
- {
- $Log$
- Revision 1.1 1998-10-11 12:21:01 michael
- Added file calls. Implemented for linux only
- }
|