![]() |
![]() ![]() ![]() |
dcMultiDiskScanner and dcDiskScanner components.
|
type
|
TdcScanAttribute = (saNormal, saArchive, saReadOnly, saHidden, saSystem, saDirectory, saAny);
|
TdcScanAttributes = set of TdcScanAttribute;
|
|
property SearchAttributes: TdcScanAttributes;
|
The SearchAttributes property specifies the possible file attributes for files or directories that can be found by dcMultiDiskScanner component.
|
Value | Meaning
|
saNormal | The file or directory has normal or no attributes set. If True, MultiDiskScanner will find files even without any attributes set.
|
saArchive | The file or directory is an archive file or directory. This is standard file attributes. Applications use this flag to mark files for backup or removal. Set saArchive flag to True to find files with Archive attributes set.
|
![]() |
saReadOnly | Attribute means that file or directory have read-only permission. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it. Set saReadOnly to True to find files with Read-only attributes set.
|
saHidden | The file or directory is hidden. It is not included in an ordinary directory listing. Make saHidden True to find hidden files (note that hidden directories will not be found, unless the saDirectory is specified).
|
![]() |
saSystem | The file or directory is part of, or is used exclusively by the operating system. Make saSystem True to find system files.
|
saDirectory | The "file or directory" is a directory (folder). Make saDirectory True to find directories (![]() |
saAny | All (or any) attributes is set. Set saAny property to True to find files or directories with ANY file attributes.
|
Following example demonstrates how to set or remove attributes in the SearchAttributes property. Let's suppose, we would like to add or remove from search results "hidden" files
|
|
Delphi
|
// to add attribute
|
dcDiskScanner1.SearchAttributes := dcDiskScanner1.SearchAttributes + [saHidden];
|
// to remove attribute
|
dcDiskScanner1.SearchAttributes := dcDiskScanner1.SearchAttributes - [saHidden];
|
|
C++ Builder
|
// to add attribute
|
dcDiskScanner1->SearchAttributes = dcDiskScanner1->SearchAttributes << saHidden;
|
// to remove attribute
|
dcDiskScanner1->SearchAttributes = dcDiskScanner1->SearchAttributes >> saHidden;
|
Matches, SearchSize, SearchTime properties.
|