SetLength() public method

When overridden in a derived class, sets the length of the current stream.
An I/O error occurs. The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. Methods were called after the stream was closed. must be greater than zero.
public SetLength ( long value ) : void
value long The desired length of the current stream in bytes.
return void
コード例 #1
0
ファイル: SftpFileStreamTest.cs プロジェクト: pecegit/sshnet
 public void SetLengthTest()
 {
     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
     long value = 0; // TODO: Initialize to an appropriate value
     target.SetLength(value);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }