How to trigger Finder's Move File Dialog programmatically?
I'm working on a small Cocoa utility that lets the user drag files onto its window and then moves those to a different folder.
Instead of moving the dragged file myself (via [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceMoveOperation...]
), I would like to trigger Finder's "Move File Dialog". This will give the user visual feedback (progress ba开发者_如何学编程r) and take care of error handling (e.g. file at target exists).
I've thought about using an Apple Script, but maybe there's an easier way to bring up that dialog?
Maybe you should check the NSFileManager. http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
精彩评论