I have to read a file content or read the file bytes and need to store in it our database.
Using .NET System.IO.File
we can simply call File.ReadAllBytes(file)
.
How to do it in WinSCP .NET assembly, using RemoteFileInfo
?
I have to read a file content or read the file bytes and need to store in it our database.
Using .NET System.IO.File
we can simply call File.ReadAllBytes(file)
.
How to do it in WinSCP .NET assembly, using RemoteFileInfo
?
The WinSCP .NET assembly supports providing the contents of a remote file using streams using the Session.GetFile
method:
using (Stream stream = session.GetFile("/path/file.ext"))
{
// use the stream
}