美文网首页
moveToTrash

moveToTrash

作者: 程序员都是傻子呀 | 来源:发表于2020-03-12 22:16 被阅读0次

// if (![self.url isFileURL]) {
// NSLog(@"Can't trash non file '%@'", self.url);
// return NO;
// }
//
// NSString *path = [self.url path];
// NSString *folder = [path stringByDeletingLastPathComponent];
// NSArray *files = [NSArray arrayWithObject:[path lastPathComponent]];
//
// NSInteger tag = 0;
// const BOOL ret = [[NSWorkspace sharedWorkspace]
// performFileOperation:NSWorkspaceRecycleOperation
// source:folder destination:nil files:files tag:&tag];
// return ret;

相关文章

  • moveToTrash

    // if (![self.url isFileURL]) {// NSLog(@"Can't...

网友评论

      本文标题:moveToTrash

      本文链接:https://www.haomeiwen.com/subject/veugjhtx.html