Class TTreeScanner (unit TreeScan)

Inherits from

TComponent

seems to be the minimum we need

Constructors


constructor Create (AOwner: TComponent);

caller sets the false to interrupt


Functions

destructor Destroy;

normally, don't show hidden folders

procedure ScanTree;


function GetFileMask: string;


function GetFileMaskCommaText: string;


procedure scan_directory (const dir: string);

Protected declarations

finished search


procedure SetFileMask (s: string);


procedure SetFileMaskCommaText (s: string);


Properties

property FileFound : string


property FileMask : string


property FileMaskCommaText : string


property FileSize : integer


property FindHiddenFiles : boolean


property FindHiddenFolders : boolean


property InitialDirectory : string


property Recursive : boolean


property SearchInProgress : boolean


Events

event OnDirectoryDone : TNotifyEvent


event OnDirectoryFound : TNotifyEvent

Published declarations

event OnFileFound : TNotifyEvent


event OnSearchDone : TNotifyEvent


Variables

Continue : Boolean;

Public declarations

FFileMask : string;

starting point in the tree

FFileMaskList : TStringList;

files to search for e.

FFindHiddenFiles : boolean;


FFindHiddenFolders : boolean;


FFoundObject : string;

where to notify for end of search

FFoundObjectSize : integer;

full file or folder name

FInitialDirectory : string;

size of file found

FOnDirectoryDone : TNotifyEvent;

where to notify for start of folder

FOnDirectoryFound : TNotifyEvent;

where to notify for file found

FOnFileFound : TNotifyEvent;

Private declarations

FOnSearchDone : TNotifyEvent;

where to notify for end of folder

FRecursive : boolean;

true whilst searching

FSearchInProgress : boolean;

files to search for e.


Constructors


constructor Create (AOwner: TComponent);

caller sets the false to interrupt


Functions


destructor Destroy;

normally, don't show hidden folders


procedure ScanTree;


function GetFileMask: string;


function GetFileMaskCommaText: string;


procedure scan_directory (const dir: string);

Protected declarations

finished search


procedure SetFileMask (s: string);


procedure SetFileMaskCommaText (s: string);


Properties


property FileFound : string


property FileMask : string


property FileMaskCommaText : string


property FileSize : integer


property FindHiddenFiles : boolean


property FindHiddenFolders : boolean


property InitialDirectory : string


property Recursive : boolean


property SearchInProgress : boolean


Events


event OnDirectoryDone : TNotifyEvent


event OnDirectoryFound : TNotifyEvent

Published declarations


event OnFileFound : TNotifyEvent


event OnSearchDone : TNotifyEvent


Variables


Continue : Boolean;

Public declarations


FFileMask : string;

starting point in the tree


FFileMaskList : TStringList;

files to search for e.g. *.EXE


FFindHiddenFiles : boolean;


FFindHiddenFolders : boolean;


FFoundObject : string;

where to notify for end of search


FFoundObjectSize : integer;

full file or folder name


FInitialDirectory : string;

size of file found


FOnDirectoryDone : TNotifyEvent;

where to notify for start of folder


FOnDirectoryFound : TNotifyEvent;

where to notify for file found


FOnFileFound : TNotifyEvent;

Private declarations


FOnSearchDone : TNotifyEvent;

where to notify for end of folder


FRecursive : boolean;

true whilst searching


FSearchInProgress : boolean;

files to search for e.g. *.EXE, *.DLL