2.1.5.12.19 FileNameInformation
This operation is not supported from a remote client, it is only supported from a local client or as part of processing a query for the FileAllInformation operation as specified in section 2.1.5.12.3. If used to query from a remote client, this operation MUST be failed with a status code of STATUS_NOT_SUPPORTED.
OutputBuffer is of type FILE_NAME_INFORMATION as described in [MS-FSCC] section 2.4.5.
This routine uses the following local variables:
Unicode string: FileName
32-bit unsigned integers: FileNameLength, AvailableNameLength
Pseudocode for the operation is as follows:
If OutputBufferSize is smaller than BlockAlign(FieldOffset(FILE_NAME_INFORMATION.FileName) + 2, 4), the operation MUST be failed with a status code of STATUS_INFO_LENGTH_MISMATCH.
Set FileName to BuildRelativeName(Open.Link, Open.File.Volume.RootDirectory).
Set FileNameLength to the length, in bytes, of FileName.
Set OutputBuffer.FileNameLength to FileNameLength.
Set AvailableNameLength to BlockAlignTruncate((OutputBufferSize - FieldOffset(FILE_NAME_INFORMATION.FileName)), 2).
If AvailableNameLength < FileNameLength, the object store MUST fail the operation with:
AvailableNameLength bytes copied from FileName to OutputBuffer.FileName.
ByteCount set to FieldOffset(FILE_NAME_INFORMATION.FileName) + AvailableNameLength.
Status set to STATUS_BUFFER_OVERFLOW.
EndIf
Upon successful completion of the operation, the object store MUST return:
FileNameLength bytes copied from FileName to OutputBuffer.FileName.
ByteCount set to FieldOffset(FILE_NAME_INFORMATION.FileName) + FileNameLength.
Status set to STATUS_SUCCESS.