0
我试过这段代码,但它适用于下载文件夹(示例路径:/Users/%@/Downloads/
),不适用于应用程序文件夹。所以我想访问Application/iTunes/contents/
,但我无法访问此路径。如何访问可可中的应用程序包内容文件夹?
我的代码:
- (IBAction)showTrashPressed:(id)sender
{
NSString *trashPath = [NSString stringWithFormat:@"/Users/%@/Applications/",NSUserName()];
////NSLog(@"%@",trashPath);
//[[NSWorkspace sharedWorkspace] selectFile:trashPath inFileViewerRootedAtPath:@"Finder"];
[[NSWorkspace sharedWorkspace]openFile:trashPath withApplication:@"Finder"];
}
谢谢,此代码的工作以及.. –