path that points to location in memory?

peteratoce

New member
Joined
Apr 6, 2007
Messages
1
Programming Experience
10+
The remarks for the System.io.Path class definition tell us that "A path does not necessarily point to a location on disk;... a path might map to a location in memory".

I find that very interesting, because it might enable me to avoid going through a temporary file on HD, when certain functions insist to be passed a file path!

Unfortunately I have no idea on how to accomplish this, and I could not find an example, in spite of extensive search through the Web. Anyone ever found more info on this?

Peter
 
It's getting more at the point that some devices dont have paths. For example, on a Java Virtual Machine running in a very simple embedded device (a washing pachine) a "path" might simply be a memory location and a number of bytes.. Some machines have no file system because all the code they ever run is stored in rom. Such a path might be "123@456" - 123 bytes at 456. Try not to think of this in a Windows-Is-The-Only-Thing-In-The-Computing-World point of view. On windows paths refer to some point in the filesystem, not some location on disk. All in all, a path is contextual to the environment in which it is found.

ps; What's the difference between memory and disk anyway? Is a disk not memory? Can memory not be a disk?

Semantics..
 
I find that very interesting, because it might enable me to avoid going through a temporary file on HD, when certain functions insist to be passed a file path!

No getting round that, but those functions MIGHT be overloaded to accept a stream instead of a path, in which case you can write to a memory stream, then reset it to the start, and pass it to another function for reading, thereby avoiding the temporary file
 
Back
Top