Renci.SshNet.Sftp.SftpFileStream.Flush C# (CSharp) Method

Flush() public method

Clears all buffers for this stream and causes any buffered data to be written to the file.
An I/O error occurs. Stream is closed.
public Flush ( ) : void
return void
        public override void Flush()
        {
            lock (_lock)
            {
                CheckSessionIsOpen();

                if (_bufferOwnedByWrite)
                {
                    FlushWriteBuffer();
                }
                else
                {
                    FlushReadBuffer();
                }
            }
        }

Usage Example

Esempio n. 1
0
 public void FlushTest()
 {
     SftpSession session = null; // TODO: Initialize to an appropriate value
     string path = string.Empty; // TODO: Initialize to an appropriate value
     FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value
     SftpFileStream target = new SftpFileStream(session, path, mode); // TODO: Initialize to an appropriate value
     target.Flush();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }