The extended file attributes is a 32 bit value composed of attributes and flags.
Any combination of the following attributes is acceptable, except all other file attributes override FILE_ATTRIBUTE_NORMAL:
FILE_ATTRIBUTE_ARCHIVE | 0x020 | The file has not been archived since it was last modified. Applications use this attribute to mark files for backup or removal. |
FILE_ATTRIBUTE_COMPRESSED | 0x800 | The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories. |
FILE_ATTRIBUTE_NORMAL | 0x080 | The file has no other attributes set. This attribute is valid only if used alone. |
FILE_ATTRIBUTE_HIDDEN | 0x002 | The file is hidden. It is not to be included in an ordinary directory listing. |
FILE_ATTRIBUTE_READONLY | 0x001 | The file is read only. Applications can read the file but cannot write to it or delete it. |
FILE_ATTRIBUTE_TEMPORARY | 0x100 | The file is temporary |
FILE_ATTRIBUTE_DIRECTORY | 0x010 | The file is a directory |
FILE_ATTRIBUTE_SYSTEM | 0x004 | The file is part of or is used exclusively by the operating system. |
Any combination of the following flags is acceptable:
FILE_FLAG_WRITE_THROUGH | 0x80000000 | Instructs the operating system to write through any intermediate cache and go directly to the file. The operating system can still cache write operations, but cannot lazily flush them. |
FILE_FLAG_NO_BUFFERING | 0x20000000 | Requests the server to open the file with no intermediate buffering or caching; the server is not obliged to honor the request. An application must meet certain requirements when working with files opened with FILE_FLAG_NO_BUFFERING. File access must begin at offsets within the file that are integer multiples of the volume's sector size; and must be for numbers of bytes that are integer multiples of the volume's sector size. For example, if the sector size is 512 bytes, an application can request reads and writes of 512, 1024, or 2048 bytes, but not of 335, 981, or 7171 bytes. |
FILE_FLAG_RANDOM_ACCESS | 0x10000000 | Indicates that the application intends to access the file randomly. The server MAY use this flag to optimize file caching. |
FILE_FLAG_SEQUENTIAL_SCAN | 0x08000000 | Indicates that the file is to be accessed sequentially from beginning to end. Windows uses this flag to optimize file caching. If an application moves the file pointer for random access, optimum caching may not occur; however, correct operation is still guaranteed. Specifying this flag can increase performance for applications that read large files using sequential access. Performance gains can be even more noticeable for applications that read large files mostly sequentially, but occasionally skip over small ranges of bytes. |
FILE_FLAG_DELETE_ON_CLOSE | 0x04000000 | Requests that the server is delete the file immediately after all of its handles have been closed. |
FILE_FLAG_BACKUP_SEMANTICS | 0x02000000 | Indicates that the file is being opened or created for a backup or restore operation. The server SHOULD allow the client to override normal file security checks, provided it has the necessary permission to do so. |
FILE_FLAG_POSIX_SEMANTICS | 0x01000000 | Indicates that the file is to be accessed according to POSIX rules. This includes allowing multiple files with names differing only in case, for file systems that support such naming. (Use care when using this option because files created with this flag may not be accessible by applications written for MS-DOS, Windows 3.x, or Windows NT.) |