共用方式為


2.1.5.12.5 FileAttributeTagInformation

OutputBuffer is of type FILE_ATTRIBUTE_TAG_INFORMATION as defined in [MS-FSCC] section 2.4.6.

Pseudocode for the operation is as follows:

  • If OutputBufferSize is smaller than sizeof(FILE_ATTRIBUTE_TAG_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.

  • If Open.GrantedAccess does not contain FILE_READ_ATTRIBUTES, the operation MUST be failed with STATUS_ACCESS_DENIED.

  • If Open.Stream.StreamType is DirectoryStream:

    • The object store MUST set OutputBuffer.FileAttributes equal to the value of Open.File.FileAttributes.

    • The object store MUST set FILE_ATTRIBUTE_DIRECTORY in OutputBuffer.FileAttributes.

  • Else:

    • This is a DataStream. The object store MUST set OutputBuffer.FileAttributes equal to the value of Open.File.FileAttributes. The following attribute values, if they are set in Open.File.FileAttributes, MUST NOT be copied to OutputBuffer.FileAttributes (attribute flags are defined in [MS-FSCC] section 2.6):

      • FILE_ATTRIBUTE_COMPRESSED

      • FILE_ATTRIBUTE_TEMPORARY

      • FILE_ATTRIBUTE_SPARSE_FILE

      • FILE_ATTRIBUTE_ENCRYPTED

      • FILE_ATTRIBUTE_INTEGRITY_STREAM<159>

    • If Open.Stream.IsSparse is TRUE, the object store MUST set FILE_ATTRIBUTE_SPARSE_FILE in OutputBuffer.FileAttributes.

    • If Open.Stream.IsEncrypted is TRUE, the object store MUST set FILE_ATTRIBUTE_ENCRYPTED in OuputBuffer.FileAttributes.

    • If Open.Stream.IsTemporary is TRUE, the object store MUST set FILE_ATTRIBUTE_TEMPORARY in OutputBuffer.FileAttributes.

    • If Open.Stream.IsCompressed is TRUE, the object store MUST set FILE_ATTRIBUTE_COMPRESSED in OutputBuffer.FileAttributes.

    • If Open.Stream.ChecksumAlgorithm != CHECKSUM_TYPE_NONE, the object store MUST set FILE_ATTRIBUTE_INTEGRITY_STREAM in OutputBuffer.FileAttributes.<160>

  • EndIf

  • If OutputBuffer.FileAttributes is 0, the object store MUST set FILE_ATTRIBUTE_NORMAL in OutputBuffer.FileAttributes.

  • OutputBuffer.ReparseTag MUST be set to Open.File.ReparseTag.

  • Upon successful completion of the operation, the object store MUST return:

    • ByteCount set to sizeof(FILE_ATTRIBUTE_TAG_INFORMATION).

    • Status set to STATUS_SUCCESS.