TdcScanAttributes type
Return to Introduction 
Unit
dcInternal  

Declaration
type  
  TdcScanAttribute = (saNormal, saArchive, saReadOnly, saHidden, saSystem, saDirectory, saAny);  
 
  TdcScanAttributes = set of TdcScanAttribute;  

Description
The TdcScanAttributes type is the set of possible attributes for files or directories.  

ValueMeaning  
saNormalThe file or directory has no other attributes set. If True, file can be without any attributes.  
saArchiveThe 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.  
saReadOnlyAttribute means that file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.  
saHiddenThe file or directory is hidden. It is not included in an ordinary directory listing.  
saSystemThe file or directory is part of, or is used exclusively by the operating system.  
saDirectoryThe "file or directory" is a directory.  
saAnyThe file has any attributes. This flag used by dcDiskScanner, dcMultiDiskScanner and dcFolderListView components to specify that we'd like to find files and directories with ANY attributes.  

Example
procedure TForm1.dcDiskScannerFileFound(Sender: TObject; FileName, FileType: String; FileSize: Int64; FileAttributes: TdcScanAttributes; LargeIcon, SmallIcon: TIcon; TotalFiles: Integer; TotalSize: Int64);  
begin  
  if saDirectory in FileAttributes then  
    ShowMessage('This is directory!')  
  else  
   if not (saReadOnly in FileAttributes) then  
     ShowMessage('This file is not read-only');  
end;