Imaginary File Path
Imaginary File Path
- Subject: Imaginary File Path
- From: John Goodman <email@hidden>
- Date: Fri, 7 Dec 2007 09:35:26 -0500
I'm working with a C++ command line tool - written for a PC platform
but compiled for the Mac - that takes a file path as one of its
parameters.
I'm creating data that gets processed by this tool. Right now, I'm
saving all the data to a temporary file and feeding the tool with the
path to the temporary file.
What I'd like to do instead, is to find a way to present my data as
if it were a file, without actually saving the data to disk. If I
have the data in memory, I'd like to be able to persuade the command
line tool that the file is "really" on the disk, by giving it an
"imaginary" file path.
Ideally, I could even stream the data to the tool, as long as the
tool thought it was working with a file.
What I'm looking for is something that's the complement of an
NSStream object. I can create an NSStream with either an NSData
pointer, or an NSString pointer representing a file path. I'd like to
take a stream, or a pointer to some data, and represent it as a path
to a file.
I can't tell if this idea is insane or if the solution is obvious.
Would anyone like to set me straight?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden