Hi,
For my app I need to use the Carbon file manager API to get the size of a folder (NSEnumerator is slow, and using NSTask with a shell command is even worse). I've imported the Carbon framework, and I'm using this method to get the size of a folder:
http://www.cocoabuilder.com/archive/message/cocoa/2005/5/20/136503
It uses an FSRef as an argument, and my path string is currently an NSString. I tried using this to convert the NSString to an FSRef:
FSRef f;
OSStatus os_status = FSPathMakeRef((const UInt8 *)[filePath fileSystemRepresentation], &f, NULL);
if (os_status != noErr) {
NSLog(@"fsref creation failed");
}
And then I called the folder size method:
[self fastFolderSizeAtFSRef:f];
However when I try to build, I get this error regarding the above line:
error: incompatible type for argument one of 'fastFolderSizeAtFSRef:'
Any help would be appreciated. Thanks