For async operations, FileStream position is updated if a write is only partial. For example:
|
_strategy.OnIncompleteOperation(_singleSegment.Length, 0); |
For sync operations, if the write succeeds only partially the position on the FileStream is not updated:
|
RandomAccess.WriteAtOffset(_fileHandle, buffer, _filePosition); |
|
_filePosition += buffer.Length; |
cc @adamsitnik
For async operations, FileStream position is updated if a write is only partial. For example:
runtime/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.ThreadPoolValueTaskSource.cs
Line 126 in 055e04b
For sync operations, if the write succeeds only partially the position on the FileStream is not updated:
runtime/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/OSFileStreamStrategy.cs
Lines 244 to 245 in 055e04b
cc @adamsitnik