Pseudocode for the operation is as follows:
If Open.File.Volume.IsReadOnly is TRUE, the operation MUST be failed with STATUS_MEDIA_WRITE_PROTECTED.
If Open.HasManageVolumeAccess is FALSE, the operation MUST be failed with STATUS_PRIVILEGE_NOT_HELD.
The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:
If Open.Stream.ValidDataLength is greater than InputBuffer.ValidDataLength.
If Open.Stream.IsCompressed is TRUE.
If Open.Stream.IsSparse is TRUE.
If Open.File.FileType is DirectoryFile.
If Open.Stream.Oplock is not empty, the object store MUST check for an oplock break according to the algorithm in section 18.104.22.168, with input values as follows:
Open equal to this operation's Open.
Oplock equal to Open.Stream.Oplock.
Operation equal to "SET_INFORMATION".
OpParams containing a member FileInformationClass containing FileValidDataLengthInformation.
Open.Stream.ValidDataLength MUST be set to InputBuffer.ValidDataLength.