Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SharpSVN how can you Export a file to memory instead of to the filesystem?

So I know how to export files @ certain revisions to the filesystem (because all of the overloads for Export have paths in them) but I do not want to have to use the filesystem for ease of access purposes. Is there a way to redirect this to a string or something? Thanks.

like image 406
Sam F Avatar asked Oct 17 '25 05:10

Sam F


1 Answers

You can use SvnClient.Write() to do this.

Example:

using(var stream = new MemoryStream())
{
    // export urlToFile, at revision 1234:
    client.Write(new SvnUriTarget(new Uri(urlToFile), 1234), stream);
}
like image 90
Sander Rijken Avatar answered Oct 19 '25 22:10

Sander Rijken



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!