2.1.5.6 Server Requests Querying a Directory

The server provides:

  • Open: An Open of a DirectoryStream.

  • FileInformationClass: The type of information being queried, as specified in [MS-FSCC] section 2.4.

  • OutputBufferSize: The maximum number of bytes to return in OutputBuffer.

  • RestartScan: A Boolean value which, if TRUE, indicates that enumeration is restarted from the beginning of the directory. If FALSE, enumeration continues from the last position.

  • ReturnSingleEntry: A Boolean value which, if TRUE, indicates that at most one entry MUST be returned. If FALSE, a variable count of entries could be returned, not to exceed OutputBufferSize bytes.

  • FileIndex: An index number from which to resume the enumeration if the object store supports it (optional).

  • FileNamePattern: A Unicode string containing the file name pattern to match. The object store MUST treat any asterisk ("*") and question mark ("?") characters in FileNamePattern as wildcards. FileNamePattern could be empty. The object store MUST treat an empty value as equivalent to the pattern "*".

On completion, the object store MUST return:

  • Status: An NTSTATUS code that specifies the result.

  • OutputBuffer: An array of bytes containing the query results. The structure of these bytes is dependent on the FileInformationClass, as noted in the relevant subsection.

  • ByteCount: The number of bytes stored in OutputBuffer.