multidiskscanner TDiskScanList class
Return to Introduction  Previous page  Next page
dcDiskScanner. Used in the dcMultiDiskScanner component.  

  TDiskScanList = class(TList)  
    procedure AddPath(PathMask: String;  
                      IncludeSubfolders: Boolean);  
    procedure Clear;  
    // functions returns True if successfull  
    function LoadFromFile(FileName: String): Boolean;  
    function SaveToFile(FileName: String): Boolean;  

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:  
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);  
clears all records (searching rules) from the IncludeList or ExcludeList.  
saves the include or exclude list from the text-file. Example:  
restores the include or include list from the text-file. Example:  

tip To add the new rule to IncludeList or ExcludeList at run-time - call In(Ex)cludeList.AddPath(...) method. To clear the list - call In(Ex)cludeList.Clear method. Please see an example for more details.  

See also
TDiskScannerPath class and dcMultiDiskScanner component.