fscopyobjectasynch : be asked for decision where file is going to be overwritten
I am developping a small file copy utility and I am using fscopyobjectasynch to copy files. When a file already exists in the destination, I w开发者_JAVA百科ould like to ask the user if he want to keep the original file or to overwrite it.
I am trying to find a way to achive this whith fscopyobjectasynch
Thanks for your help
As stated in the documentation, FSCopyObjectAsync
will overwrite an existing object at the destination if you give it the kFSFileOperationOverwrite
flag. If you don't, it won't.
You can present an NSAlert to determine whether you should pass that flag.
精彩评论