> doh! i put my example together from two different tests, thus the
> mis-named variables. sorry.
Oki doki!
> but, what about working w/ a File obj -- does a File *have* to be
> linked to the file system (ie, harddrive)? i wonder if one can build-up
> a text file via the MemoryStream as in your example, and then convert
> it somehow into a File, say if that's what some other function requires
> for further manipulation. (this is not my present scenario, but is
> interesting nonetheless).
You get me lost here.
It's very confusing the way you say "only File"....
Here is a list of what you could call a file and their possible source.
I think I get most of them, but I might have missed what you were thinking
about, who knows?
..NET: System.IO.Stream: could be anything, including a MemoryStream as shown
..NET: System.IO.FileStream: typically only a file system file
..NET / C: string: filename: has to be a file system file in most case. (well
could be a pipe or a printer port, etc... but it's seldom the case)
C: HANDLE: many thing (socket, pipe, memoy mapped file, file system file,
com port, printer port, etc...) but typically, when created by the user, a
file system file.
However, with some effort, could be a memory mapped file with no file system
representation.
..NET: IntPtr (point to a Handle): as above.
So, look at the various signature of your methods/functions and you get your
answer.
if you don't know what you're speaking about, you can't tell!
|