Unit Bh_util1

Classes

Functions

AddBkSlash - Remove last backslash if available
CopyFileO - Function ThePath Returns the path S in the form x:\ x:\aaa x:\aaa\bbb This is compatible with the DirectoryListBox's property Directory and fullfills the need of the FileListBox's property Directory

Function ThePath Returns the path in the form x:\ x:\aaa x:\aaa\bbb This is compatible with the DirectoryListBox's property Directory and fullfills the need of the FileListBox's property Directory
CopyFileOB - procedure CopyFileO
DeleteFileAndAsk - This code came from Lloyd's help file!
DiskInserted -
GetFileSize -
GetHighestDirNumber -
GetHighestDirNumberString - handles '.
HasAttr - Exceptions: ECopyError ('Destination '+DestPath+' is not a directory.
StripBkSlash - -------------------------------------------------------------
ThePath - Add last backslash if not available

Types

TOverwrite

Constants

CopyBufferLength

Variables


Functions


Function AddBkSlash(S:String):String;

Remove last backslash if available

procedure CopyFileO (SrcName, DestPath:String; Overwrite:Boolean);

Function ThePath Returns the path S in the form x:\ x:\aaa x:\aaa\bbb This is compatible with the DirectoryListBox's property Directory and fullfills the need of the FileListBox's property Directory

Function ThePath Returns the path in the form x:\ x:\aaa x:\aaa\bbb This is compatible with the DirectoryListBox's property Directory and fullfills the need of the FileListBox's property Directory


procedure CopyFileOB(SrcName, DestPath:String; Overwrite:Boolean; CopyBuffer:Pointer; CopyBufferLength:Longint);

procedure CopyFileO

function DeleteFileAndAsk(Filename:string; Overwrite:Boolean):boolean;

This code came from Lloyd's help file!

function DiskInserted(Drive:Char):boolean;


function GetFileSize(const FileName: string): LongInt;


Function GetHighestDirNumber(Path:string):Longint;


Function GetHighestDirNumberString(Path:string):String;

handles '..' too

function HasAttr(const FileName: string; Attr: Word): Boolean;

Exceptions: ECopyError ('Destination '+DestPath+' is not a directory.'); ECopyError (FmtLoadStr(SFOpenError, [SrcName])); EOverwriteError('File '+DestName+' already exists'); EFCreateError (FmtLoadStr(SFCreateError, [DestName]));

procedure CopyFileOB


Function StripBkSlash(S:String):String;

-------------------------------------------------------------

Function ThePath(S:String):String;

Add last backslash if not available

Types


TOverwrite      = (No, Ask, Yes);

Constants

CopyBufferLength = 16384

File utilities. Bernd Hoen, 27.3.1996

Variables