共用方式為


2.1.5.12.21 FileNetworkOpenInformation

OutputBuffer is of type FILE_NETWORK_OPEN_INFORMATION as defined in [MS-FSCC] section 2.4.33.

Pseudocode for the operation is as follows:

  • If OutputBufferSize is smaller than sizeof(FILE_NETWORK_OPEN_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.

  • OutputBuffer MUST be constructed as follows:

    • OutputBuffer.CreationTime set to Open.File.CreationTime.

    • OutputBuffer.LastWriteTime set to Open.File.LastModificationTime.

    • OutputBuffer.ChangeTime set to Open.File.LastChangeTime.

    • OutputBuffer.LastAccessTime set to Open.File.LastAccessTime.

    • OutputBuffer.FileAttributes set to Open.File.FileAttributes.

    • If Open.Stream.StreamType is DirectoryStream:

      • FILE_ATTRIBUTE_DIRECTORY, as specified in [MS-FSCC] section 2.6, MUST always be set in OutputBuffer.FileAttributes.

    • Else:

      • For a DataStream, the following attribute values, as specified in [MS-FSCC] section 2.6, MUST NOT be copied to OutputBuffer.FileAttributes:

        • FILE_ATTRIBUTE_COMPRESSED

        • FILE_ATTRIBUTE_TEMPORARY

        • FILE_ATTRIBUTE_SPARSE_FILE

        • FILE_ATTRIBUTE_ENCRYPTED

        • FILE_ATTRIBUTE_INTEGRITY_STREAM<166>

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

      • If Open.Stream.IsEncrypted is TRUE, set FILE_ATTRIBUTE_ENCRYPTED in OuputBuffer.FileAttributes.

      • If Open.Stream.IsTemporary is TRUE, set FILE_ATTRIBUTE_TEMPORARY in OutputBuffer.FileAttributes.

      • If Open.Stream.IsCompressed is TRUE, set FILE_ATTRIBUTE_COMPRESSED in OutputBuffer.FileAttributes.

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

      • OutputBuffer.AllocationSize set to Open.Stream.AllocationSize.

      • OutputBuffer.EndOfFile set to Open.Stream.Size.

    • EndIf

      • If OutputBuffer.FileAttributes is 0, set FILE_ATTRIBUTE_NORMAL in OutputBuffer.FileAttributes.

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

    • ByteCount set to sizeof(FILE_NETWORK_OPEN_INFORMATION).

    • Status set to STATUS_SUCCESS.