mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-22 17:25:54 +02:00
Implement Flush for SMB2 (#93)
Co-authored-by: Nich Overend <nich@opusinvestors.com>
This commit is contained in:
parent
4456bc75c5
commit
a0bb742dc2
1 changed files with 14 additions and 1 deletions
|
@ -117,7 +117,20 @@ namespace SMBLibrary.Client
|
|||
|
||||
public NTStatus FlushFileBuffers(object handle)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
FlushRequest request = new FlushRequest();
|
||||
request.FileId = (FileID) handle;
|
||||
|
||||
TrySendCommand(request);
|
||||
SMB2Command response = m_client.WaitForCommand(request.MessageID);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Header.Status == NTStatus.STATUS_SUCCESS && response is FlushResponse)
|
||||
{
|
||||
return response.Header.Status;
|
||||
}
|
||||
}
|
||||
|
||||
return NTStatus.STATUS_INVALID_SMB;
|
||||
}
|
||||
|
||||
public NTStatus LockFile(object handle, long byteOffset, long length, bool exclusiveLock)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue