Share via


File Attributes

5/10/2007

The File Attributes command retrieves information about a file and stores this information in a structure. The following table shows possible values. You can use a combination of these values. However, all other values override DAFILEATTRIB_NORMAL.

Value Name Description

1

DAFILEATTRIB_READONLY

The file is read-only. Applications can read the file but cannot write to it or delete it.

2

DAFILEATTRIB_HIDDEN

The file is hidden. It is not included in an ordinary directory listing.

4

DAFILEATTRIB_SYSTEM

The file is part of the operating system or is used exclusively by it.

32

DAFILEATTRIB_ARCHIVE

The file is an archive file. Applications use this attribute to mark files for backup or removal.

128

DAFILEATTRIB_NORMAL

The file has no other attributes set. This attribute is valid only if it is used alone.

256

DAFILEATTRIB_TEMPORARY

The file is being used for temporary storage. File systems attempt to keep all the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.

4096

DAFILEATTRIB_OFFLINE

The data of the file is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. Applications should not arbitrarily change this attribute.

8192

DAFILEATTRIB_NOT_CONTENT_INDEXED

The file is indexed by the content indexing service.

The following attributes cannot be set with this command:

  • DAFILEATTRIB_DIRECTORY
  • DAFILEATTRIB_ENCRYPTED
  • DAFILEATTRIB_SPARSE_FILE
  • DAFILEATTRIB_REPARSE_POINT
  • DAFILEATTRIB_COMPRESSED

See Also

Concepts

Constants