2.1.5.6.1 FileObjectIdInformation

msdn link

The following local variable is used:

  • Boolean value (initialized to FALSE): EmptyPattern

Support for this operation is optional. If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.<56>

OutputBuffer is an array of one or more FILE_OBJECTID_INFORMATION structures as specified in [MS-FSCC] section 2.4.31.

This Information class can only be sent to a specific directory that maintains a list of all ObjectIDs on the volume. The name of this directory is: "\$Extend\$ObjId:$O:$INDEX_ALLOCATION". If it is sent to any other file or directory on the volume, the operation MUST be failed with STATUS_INVALID_INFO_CLASS.<57>

Pseudocode for the operation is as follows:

  • If FileNamePattern is not empty and FileNamePattern.Length (0 is a valid length) is not a multiple of 4, the operation MUST be failed with STATUS_INVALID_PARAMETER.

  • If FileNamePattern is empty, the object store MUST set EmptyPattern to TRUE; otherwise it MUST set EmptyPattern to FALSE.

  • If FileNamePattern.Length is less than the size of an ObjectId (16 bytes), FileNamePattern.Buffer will be zero filled up to the size of ObjectId.

  • The object store MUST search the volume for Files having File.ObjectId matching FileNamePattern. To determine if there is a match, FileNamePattern.Buffer is compared to ObjectId in chunks of ULONG (4 bytes). Any comparison where the ObjectId chunk is greater than or equal to the FileNamePattern.Buffer chunk is considered a match. If FileNamePattern.Length is longer than the size of ObjectId and the first 16 bytes (size of ObjectId) of FileNamePattern.Buffer is identical to ObjectId, FileNamePatter.Buffer is considered as greater than ObjectId.<58>

  • If RestartScan is FALSE and EmptyPattern is TRUE and there is no match, the operation MUST be failed with STATUS_NO_MORE_FILES.

  • The operation MUST fail with STATUS_NO_SUCH_FILE under any of the following conditions:

    • EmptyPattern is FALSE and there is no match.

    • EmptyPattern is TRUE and RestartScan is TRUE and there is no match.

  • The operation MUST fail with STATUS_BUFFER_OVERFLOW if OutputBufferSize < sizeof(FILE_OBJECTID_INFORMATION).

  • If there is at least one match, the operation is considered successful. The object store MUST return:

    • Status set to STATUS_SUCCESS.

    • OutputBuffer containing an array of as many FILE_OBJECTID_INFORMATION structures that match the query as will fit in OutputBuffer unless ReturnSingleEntry is TRUE, in which case only a single entry will be stored in OutputBuffer. To continue the query, FileNamePattern MUST be empty and RestartScan MUST be FALSE.

    • ByteCount set to the number of bytes filled in OutputBuffer.