Unit ChfUtils

Classes

Functions

AddBackSlash - /////////////////////////////////////////////////} These are general-purpose functions used by all versions .
ChangeFileExt - /////////////////////////////////////////////////////////
CreateIOError - These functions enable IO-errors to be raised artificially .
DirectoryExists - /////////////////////////////////////////////////////////
ExtractFileExt - ////////////////////////////////////////
ExtractFileName - /////////////////////////////////////////////////////////
ExtractFilePath - /////////////////////////////////////////////////////////} (* Function ExtractFilePath(aName:String):String; {return the path only - strip filename out} {$ifdef TPW} var P: array[0.
FileExists - /////////////////////////////////////////////////////////
FileVersionInfo -
FirstDirectoryBetween - Directory.
FSize - /////////////////////////////////////////////////////////
lFTime - /////////////////////////////////////////////////////////
Min -
RaiseError -
RaiseErrorStr -
RaiseIOError -
RemoveBackSlash - but where AddBackSlash() was called.
sFTime - /////////////////////////////////////////////////////////
Uppercase - /////////////////////////////////////////////////} These functions provide string and file-handling services that Delphi offers in SysUtils .

Types

Constants

faArchive
faDirectory
fmOpenRead
fmOpenReadWrite
fmOpenWrite
fmShareCompat
fmShareDenyNone
fmShareDenyRead
fmShareDenyWrite
fmShareExclusive

Variables


Functions


function AddBackSlash(Const DirName : string) : string;

/////////////////////////////////////////////////} These are general-purpose functions used by all versions ... {/////////////////////////////////////////////////

Function ChangeFileExt(const aName, aExt:String):String;

/////////////////////////////////////////////////////////

function CreateIOError(const EMess, ECode: Integer): EInOutError;

These functions enable IO-errors to be raised artificially ...

Function DirectoryExists(const s:String): Boolean;

/////////////////////////////////////////////////////////

Function ExtractFileExt(const aName:String):String;

////////////////////////////////////////

function ExtractFileName(const s:String):String;

/////////////////////////////////////////////////////////

Function ExtractFilePath(const aName:String):String;

/////////////////////////////////////////////////////////} (* Function ExtractFilePath(aName:String):String; {return the path only - strip filename out} {$ifdef TPW} var P: array[0..79] of Char; {$endif TPW} Var i:Integer; begin {$ifdef Delphi} aName := ExpandFileName(aName); {$else Delphi} {$ifdef Windows} FileExpand(P, Str2PChar(aName)); aName := StrPas(p); {$else Windows} aName := FExpand(aName); {$endif Windows} {$endif Delphi} i := Length(aName); while aName[i] <> '\' do { Expanded filenames must have '\' } dec(i); ExtractFilePath := Copy(aName,1,i) end;

Function FileExists(Const S : String) : Boolean;

/////////////////////////////////////////////////////////

function FileVersionInfo(const fName, StringToGet: string): string;


function FirstDirectoryBetween(const s1, s2: string): string;

Directory...

Function FSize(const S : String): LongInt;

/////////////////////////////////////////////////////////

Function lFTime(var f: file): LongInt;

/////////////////////////////////////////////////////////

function Min(const I1, I2: LongInt): LongInt;


procedure RaiseError(const EClass: ExceptClass; const Res: Integer);


procedure RaiseErrorStr(const EClass: ExceptClass; const Res: Integer; const Mes: string);


procedure RaiseIOError(const EMess, ECode: Integer);


function RemoveBackSlash(const S: string): string;

but where AddBackSlash() was called.

Function sFTime(const s:string): LongInt;

/////////////////////////////////////////////////////////

Function Uppercase(S: String): String;

/////////////////////////////////////////////////} These functions provide string and file-handling services that Delphi offers in SysUtils ... {/////////////////////////////////////////////////

Types


Constants

faArchive = Archive

faDirectory = Directory

fmOpenRead = $00

some miscellaneous routines for the ChiefLZ package

fmOpenReadWrite = $02

fmOpenWrite = $01

fmShareCompat = $00

fmShareDenyNone = $40

fmShareDenyRead = $30

fmShareDenyWrite = $20

fmShareExclusive = $10


Variables