Avoiding temp file
Avoiding temp file
- Subject: Avoiding temp file
- From: Johan Kool <email@hidden>
- Date: Fri, 2 Jul 2004 00:13:24 +0200
Hello,
Is there a way where I can avoid writing to a temporary file?
- (NSData *)dataRepresentationOfType:(NSString *)aType {
// A bit (w)hacky this way!!!
[[mainArrayController content] writeToFile:@"/tmp/temp.xml"
atomically:YES];
return [[NSString stringWithContentsOfFile:@"/tmp/temp.xml"]
dataUsingEncoding:NSUTF8StringEncoding];
}
I want to use dataRepresentationOfType: instead of writeToFile:ofType:
as another of my filetypes is done most easily returning NSData. I
suppose having both methods at the same time doesn't work, right?
Thanks,
Johan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.