Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Unassigned: Cannot download to a MemoryStream [2762]

$
0
0
Need to add the ability to download something to a Memory stream, a FileStream is not always the desired Stream to use.
Comments: ** Comment from web user: DevonCustard **

This works for me

var memoryStream = new MemoryStream();
var streamReader = new StreamReader(memoryStream);
if (!scpClient.IsConnected)
scpClient.Connect();
scpClient.Download(fileName, memoryStream);
memoryStream.Position = 0;
var fileContents = streamReader.ReadToEnd();


Now ironically I cannot get Upload to work with a memory stream.


Viewing all articles
Browse latest Browse all 1026

Trending Articles