Dela via


2.1.5.12.6 FileBasicInformation

OutputBuffer is of type FILE_BASIC_INFORMATION as defined in [MS-FSCC] section 2.4.7.

Pseudocode for the operation is as follows:

  • If OutputBufferSize is smaller than BlockAlign(sizeof(FILE_BASIC_INFORMATION), 8), 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.

  • The object store MUST set OutputBuffer.CreationTime equal to Open.File.CreationTime.

  • The object store MUST set OutputBuffer.LastWriteTime equal to Open.File.LastModificationTime.

  • The object store MUST set OutputBuffer.ChangeTime equal to Open.File.LastChangeTime.

  • The object store MUST set OutputBuffer.LastAccessTime equal to Open.File.LastAccessTime.

  • 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<161>

    • 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.<162>

  • EndIf

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

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

    • ByteCount set to sizeof(FILE_BASIC_INFORMATION).

    • Status set to STATUS_SUCCESS.