Search code examples
delphidelphi-7

Strange value in Searchrec.Attr (Value: 48)


I'm using TSearchRec to map directories, but one specific directory the Attr is return decimal 48 hex 30.

In SysUtils unit there are the following values:

{ File attribute constants }

  faReadOnly  = $00000001 platform;
  faHidden    = $00000002 platform;
  faSysFile   = $00000004 platform;
  faVolumeID  = $00000008 platform;
  faDirectory = $00000010;
  faArchive   = $00000020 platform;
  faSymLink   = $00000040 platform;
  faAnyFile   = $0000003F;

In this list doesn't have this value. So, how can i solve this "problem"?

Thanks


Solution

  • These are flags that can be combined with bitwise OR. So $30 is faDirectory or faArchive.

    The reason that the flags can be combined is that the flags (largely) represent independent attributes of the file system object. A file system object can have none, one, or many of these attributes.