Actually i want to read and write the file using filemanager in Quicklook plugin.
The code works fine in the seperate cocoa applications but when the code is embedded in the QuickLook application it just crashes and retuerns the ” execute bad excess” error.
the code used to read the file is as below:
NSString* licPref = [[[NSString alloc] init] autorelease];
NSFileManager* fileManager = [NSFileManager defaultManager];
if ( [fileManager fileExistsAtPath:@"/Library/QuickLook/IndesignQL.qlgenerator/.lic.txt"] ){
licPref = [[NSString alloc] stringWithContentsOfFile:@"/Library/QuickLook/IndesignQL.qlgenerator/.lic.txt"];
}
Thanks in advance…
Quicklook works in sandboxed environment. You cannot access the file system using NSFileManager.