![]() |
![]() ![]() ![]() |
dcDiskScanner. Used in the dcMultiDiskScanner component.
|
type
|
TDiskScanList = class(TList)
|
public
|
procedure AddPath(PathMask: String;
|
IncludeSubfolders: Boolean);
|
procedure Clear;
|
|
// functions returns True if successfull
|
function LoadFromFile(FileName: String): Boolean;
|
function SaveToFile(FileName: String): Boolean;
|
end;
|
The TDiskScanList class is the list (successor of TList class) which contains the searching rules for IncludeList and ExcludeList properties. The TDiskScanList contains the list of TDiskScannerPath entries.
|
|
The TDiskScannerPath items contains the information about the path and searching mask to include or exclude from search results and whether would you like to scan all subfolders located under specified path.
|
|
Since TDiskScanList is successor of TList calss, it contains all properties and methods that comes with regular TList, plus three method which allows to easily operate with Include and Exclude lists:
|
|
AddPath
|
allows to add the new TDiskScannerPath items to the list. The parameters of the AddPath procedure - is the string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?) + boolean flag whether you would like to scan subdirectories under specified path. Example: dcMultiDiskScanner1.IncludeList.AddPath('c:\windows\*.*', True);
|
|
Clear
|
clears all records (searching rules) from the IncludeList or ExcludeList.
|
|
SaveToFile
|
saves the include or exclude list from the text-file. Example:
|
dcMultiDiskScanner1.IncludeList.SaveToFile('c:\include.txt');
|
|
LoadFromFile
|
restores the include or include list from the text-file. Example:
|
dcMultiDiskScanner1.ExcludeList.LoadFromFile('c:\exclude.txt');
|
![]() |
TDiskScannerPath class and dcMultiDiskScanner component.
|