System.IO.FileStream.FlushInternalBuffer C# (CSharp) Method

FlushInternalBuffer() private method

Flushes the internal read/write buffer for this stream. If write data has been buffered, that data is written out to the underlying file. Or if data has been buffered for reading from the stream, the data is dumped and our position in the underlying file is rewound as necessary. This does not flush the OS buffer.
private FlushInternalBuffer ( ) : void
return void
        private void FlushInternalBuffer()
        {
            AssertBufferInvariants();
            if (_writePos > 0)
            {
                FlushWriteBuffer();
            }
            else if (_readPos < _readLength && CanSeek)
            {
                FlushReadBuffer();
            }
        }