Is it possible to replace a string path with a steam of some sort?
Here is an example: item.path = "filename.xxx" where you use some
method (streaming comes to mind) that allows me to actually stream the
file to item.path instead of having to write it out to the hard drive
first?
Nicholas Paldino [.NET/C# MVP] - 16 Feb 2008 15:51 GMT
Ross,
How else are you going to get the file to the path? You ^must^ write
the file to the hard drive in order to, as you put it "stream the file to
the path".
You can't have a file on disk with a path without writing the file to
disk.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Is it possible to replace a string path with a steam of some sort?
> Here is an example: item.path = "filename.xxx" where you use some
> method (streaming comes to mind) that allows me to actually stream the
> file to item.path instead of having to write it out to the hard drive
> first?
ross_smith@csaa.com - 16 Feb 2008 17:40 GMT
Thanks for getting back to me.
I was hoping there was a way to wrap a memory stream (orf something)
around the process. So that the calling program would work as desired
but i could save the time it takes to write out and then read the file
again.
Thanks again.
Nicholas Paldino [.NET/C# MVP] - 16 Feb 2008 18:00 GMT
I see what you are saying. There is no object representation for a path
(they are represented as strings) which would allow you to do this. If the
method/property took a Stream, then that would be great, as you could pass
it any number of derivations of Stream which would give you the
characteristics that you want. Unfortunately, it doesn't, so you will have
to resort to writing to a temp file or something of that nature and passing
that to your property.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Thanks for getting back to me.
>
[quoted text clipped - 4 lines]
>
> Thanks again.
ross_smith@csaa.com - 16 Feb 2008 22:38 GMT
Well, thanks anyway. Didn't think so but thought i would give it a
try. Never hurts to ask.
thanks
christery@gmail.com - 17 Feb 2008 00:08 GMT
On 16 Feb, 18:40, ross_sm...@csaa.com wrote:
> Thanks for getting back to me.
>
[quoted text clipped - 4 lines]
>
> Thanks again.
but
MemoryStream whatewer = new MemoryStream();
XmlTextWriter whateverXML = new XmlTextWriter(whatever,
Encoding.None);
normally goes
XmlTextWriter whateverXML = new XmlTextWriter(@"c:
\whatever.xml",Encoding.None);
its a ram drive ;)
//CY
christery@gmail.com - 16 Feb 2008 16:54 GMT
On 16 Feb, 15:38, ross_sm...@csaa.com wrote:
> Is it possible to replace a string path with a steam of some sort?
> Here is an example: item.path = "filename.xxx" where you use some
> method (streaming comes to mind) that allows me to actually stream the
> file to item.path instead of having to write it out to the hard drive
> first?
MemoryStream whatever = new MemoryStream(); comes to mind, the
question and cap might be a clearer..
Question c# in microsoft.public.dotnet.languages.csharp is ...
プログラムすることは困難である
//CY