How to overwrite a file with NSFileManager when copying?

后端 未结 9 683
广开言路
广开言路 2020-12-02 14:13

I\'m using this method to copy a file:

[fileManager copyItemAtPath:sourcePath toPath:targetPath error:&error];

I want to overwrite a fi

9条回答
  •  独厮守ぢ
    2020-12-02 14:43

    I think the possibility of the nanosecond you mensioned is feeble. so stick to the first method of removing the existing file and copying the new file.

提交回复
热议问题