开发者

fscopyobjectasynch : be asked for decision where file is going to be overwritten

开发者 https://www.devze.com 2023-04-09 18:57 出处:网络
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 ke

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号