piped unzip (and this time it's not the wrong codesnipper)
piped unzip (and this time it's not the wrong codesnipper)
- Subject: piped unzip (and this time it's not the wrong codesnipper)
- From: Stefan Fisk <email@hidden>
- Date: Wed, 18 Feb 2004 21:46:52 +0100
hi again all!
i already knew that i had to clear the pipe, but even when i do that it
doesn't work, i just get: Exception raised during posting of
notification. Ignored. exception: *** -[NSConcreteFileHandle
readDataOfLength:]: Interrupted system call
- (NSData *)dataForKey:(NSString *)key {
NSTask *zip = [[[NSTask alloc] init] autorelease];
[zip setArguments:[NSArray arrayWithObjects:@"-p", path, key, nil]];
[zip setLaunchPath:@"/usr/bin/unzip"];
NSPipe *outputPipe = [NSPipe pipe];
[zip setStandardOutput:outputPipe];
[zip launch];
NSData *data = [[outputPipe fileHandleForReading]
readDataToEndOfFile];
[zip waitUntilExit];
if ([zip terminationStatus] != 0)
return nil;
else
return data;
}
this is all really bugging me to no end, i know it's easy =)
_______________________________________________
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.