次の方法で共有


2.2.1.2.3 SMB_EXT_FILE_ATTR

A 32-bit field containing encoded file attribute values and file access behavior flag values. The attribute and flag value names are for reference purposes only. If ATTR_NORMAL (see following) is set as the requested attribute value, it MUST be the only attribute value set. Including any other attribute value causes the ATTR_NORMAL value to be ignored. Any combination of the flag values (see following) is acceptable.<14>

This type is declared as follows:

 typedef DWORD SMB_EXT_FILE_ATTR;

Name and bitmask

Meaning

ATTR_READONLY

0x00000001

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

ATTR_HIDDEN

0x00000002

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

ATTR_SYSTEM

0x00000004

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

ATTR_DIRECTORY

0x00000010

The file is a directory.

ATTR_ARCHIVE

0x00000020

The file has not been archived since it was last modified.

ATTR_NORMAL

0x00000080

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

ATTR_TEMPORARY

0x00000100

The file is temporary. This is a hint to the cache manager that it does not need to flush the file to backing storage.

ATTR_COMPRESSED

0x00000800

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.

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.<15>

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.

DELETE_ON_CLOSE

0x04000000

Requests that the server delete the file immediately after all of its handles have been closed.

SEQUENTIAL_SCAN

0x08000000

Indicates that the file is to be accessed sequentially from beginning to end.<16>

RANDOM_ACCESS

0x10000000

Indicates that the application is designed to access the file randomly. The server can use this flag to optimize file caching.

NO_BUFFERING

0x20000000

Requests that the server open the file with no intermediate buffering or caching; the server might not honor the request. The 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.

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.