This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.
Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.
Project: I/O Utility Classes
Unit: PJFileHandle
Class: TPJFileHandle
Applies to: ~>1.0
constructor Create(const FileName: string; const Mode: LongWord;
const Inheritable: Boolean = True); overload;
constructor Create(const FileName: string; const Mode: LongWord;
const Security: PSecurityAttributes); overload;
These two overloaded constructors open or create files and record the file handle in the Handle property.
Parameters are:
FileName - Name of file to be opened or created.
Mode - File open mode. This is made up of an access mode constant ORd with a share mode constant. Valid access modes are fmOpenRead
, fmOpenWrite
, fmOpenReadWrite
and fmCreate
. The share mode must be one of fmShareCompat
, fmShareExclusive
, fmShareDenyWrite
, fmShareDenyRead
or fmShareDenyNone
.
Inheritable - Indicates whether the file handle is to be inheritable.
Security - Points to a TSecurityAttributes record that specifies the required security for the file. If the file handle is to be inheritable set the bInheritHandle field to True
.
The constructors raise EFCreateError or EFOpenError exceptions if a file cannot be created or opened respectively.