Single File System: Virtual File System Delphi Library
for Archive / Backup with Transparent Compression and Strong Encryption

TSearchRec type

TSearchRec defines file information searched for by FindFirst or FindNext.


TSearchRec = record
   Time: Integer;
   Size: Integer;
   Attr: Integer;
   Name: TFileName;
   ExcludeAttr: Integer;
   FindHandle: THandle;
   FindData: TWin32FindData;


The TSearchRec type defines file information searched for by a FindFirst or FindNext function call. If a file is found, the fields of the TSearchRec type parameter are modified to specify the found file.

Attr represents the file attributes the file attributes of the file. Test Attr against the following attribute constants or values to determine if a file has a specific attribute:

Constant   Value      Description

faReadOnly   $00000001   Read-only files
faHidden   $00000002   Hidden files
faSysFile   $00000004   System files
faVolumeID   $00000008   Volume ID files
faDirectory   $00000010   Directory files
faArchive   $00000020   Archive files
faAnyFile   $0000003F   Any file

To test for an attribute, combine the value of the Attr field with the attribute constant with the and operator. If the file has that attribute, the result will be greater than 0. For example, if the found file is a hidden file, the following expression will evaluate to True: (SearchRec.Attr and faHidden > 0).

Time contains the time stamp of the file. This is a DOS date-and-time stamp. It can be converted to a TDateTime value using FileDateToDateTime.

Size contains the size of the file in bytes.

Name contains the DOS file name and extension.

FindData contains additional information such as the file creation time, last access time, and both the long and short file names.

© 2000-2004 AidAim Software LLC Single File System: Virtual File Syste