Resource file length?
Resource file length?
- Subject: Resource file length?
- From: Randall Meadows <email@hidden>
- Date: Fri, 2 Apr 2004 12:13:43 -0500
To find out the length of the resource fork of a file, I'm using
NSString *rsrcFork = [fileName stringByAppendingPathComponent:@"rsrc"];
NSFileManager *fileMgr = [NSFileManager defaultManager];
if ([fileMgr fileExistsAtPath:rsrcFork]) {
NSFileWrapper *wrapper;
unsigned long long rsrcLength = 0;
wrapper = [[NSFileWrapper alloc] initWithPath:rsrcFork];
rsrcLength = [[wrapper fileAttributes] fileSize];
[wrapper release];
}
Is that the "approved" way? Or is there a better method?
[And yes, I really have to deal with resource forks; I'm working with
legacy files...]
Thanks!
randy
_______________________________________________
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.