Re: GetFile Stream Problem - WeOnlyDo Discussion board

Re: GetFile Stream Problem (General questions)

by wodSupport, Monday, August 08, 2005, 23:49 (7046 days ago) @ jvongillern

I tried this simple code and works for me. It does nothing smart, just downloads something to stream and then accesses first 20 bytes. [code] static void Main(string[] args)
{
SFTP s = new SFTP();
s.Blocking = true;
s.Hostname = localhost ;
s.Login = kreso ;
s.Password = test ;
s.Connect();

Stream NewMsgStream = new MemoryStream();
//Stream is readable
s.GetFile(NewMsgStream, /HOME/SOMEFILE.TXT );
NewMsgStream.Position = 0;
byte[] b = new Byte[20];
NewMsgStream.Read(b,0,20);
s.Disconnect();
}[/code]


Complete thread:

 

  • GetFile Stream Problem - jvongillern, 2005-08-08, 20:46 [*]
    • Re: GetFile Stream Problem - wodSupport, 2005-08-08, 23:49