FILE_ATTRIBUTE_ARCHIVE
&H20
|
The file should be archived. Applications use this attribute to mark files for backup or removal. |
FILE_ATTRIBUTE_COMPRESSED
(?)
|
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_HIDDEN
(?)
|
The file is hidden. It is not to be included in an ordinary directory listing. |
FILE_ATTRIBUTE_NORMAL
&H80
|
The file has no other attributes set. This attribute is valid only if used alone. |
FILE_ATTRIBUTE_OFFLINE
(?)
|
The data of the file is not immediately available. Indicates that the file data has been physically moved to offline storage. |
FILE_ATTRIBUTE_READONLY
&H1
|
The file is read only. Applications can read the file but cannot write to it or delete it. |
FILE_ATTRIBUTE_SYSTEM
&H4
|
The file is part of or is used exclusively by the operating system. |
FILE_ATTRIBUTE_TEMPORARY
(?)
|
The file is being used for temporary storage. File systems attempt to keep all of 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.
|
FILE_FLAG_WRITE_THROUGH
&H80000000
|
Instructs the operating system to write through any intermediate cache and go directly to disk. The operating system can still cache write operations, but cannot lazily flush them. |
FILE_FLAG_OVERLAPPED
&H40000000
|
Instructs the operating system to initialize the object, so ReadFile, WriteFile, ConnectNamedPipe, and TransactNamedPipe operations that take a significant amount of time to process return ERROR_IO_PENDING. When the operation is finished, an event is set to the signaled state.
When you specify FILE_FLAG_OVERLAPPED, the ReadFile and WriteFile functions must specify an OVERLAPPED structure. That is, when FILE_FLAG_OVERLAPPED is specified, an application must perform overlapped reading and writing.
When FILE_FLAG_OVERLAPPED is specified, the operating system does not maintain the file pointer. The file position must be passed as part of the lpOverlapped parameter (pointing to an OVERLAPPED structure) to the ReadFile and WriteFile functions.
This flag also enables more than one operation to be performed simultaneously with the handle (a simultaneous read and write operation, for example). |
FILE_FLAG_NO_BUFFERING
&H20000000
|
Instructs the operating system to open the file with no intermediate buffering or caching. This can provide performance gains in some situations. An application must meet certain requirements when working with files opened with FILE_FLAG_NO_BUFFERING:· File access must begin at byte offsets within the file that are integer multiples of the volume's sector size. · File access 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. · Buffer addresses for read and write operations must be aligned on addresses in memory that are integer multiples of the volume's sector size. One way to align buffers on integer multiples of the volume sector size is to use VirtualAlloc to allocate the buffers. It allocates memory that is aligned on addresses that are integer multiples of the operating system's memory page size. Since both memory page and volume sector sizes are powers of 2, this memory is also aligned on addresses that are integer multiples of a volume's sector size. An application can determine a volume's sector size by calling the GetDiskFreeSpace function. |
FILE_FLAG_RANDOM_ACCESS
&H10000000
|
Indicates that the file is accessed randomly. Windows can use this as a hint to optimize file caching. |
FILE_FLAG_SEQUENTIAL_SCAN
&H8000000
|
Indicates that the file is to be accessed sequentially from beginning to end. Windows can use this as a hint 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
&H4000000
|
Indicates that the operating system is to delete the file immediately after all of its handles have been closed, not just the handle for which you specified FILE_FLAG_DELETE_ON_CLOSE. Subsequent open requests for the file will fail, unless FILE_SHARE_DELETE is used. |
FILE_FLAG_BACKUP_SEMANTICS
(?)
|
Windows NT only: Indicates that the file is being opened or created for a backup or restore operation. The operating system ensures that the calling process overrides file security checks, provided it has the necessary permission to do so. The relevant permissions are SE_BACKUP_NAME and SE_RESTORE_NAME.You can also set this flag to obtain a handle to a directory. A directory handle can be passed to some Win32 functions in place of a file handle. |
FILE_FLAG_POSIX_SEMANTICS
&H1000000
|
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, or Windows NT. |