JohnSundell / JohnSundell/Files

How can I move a file to a new folder with a new name atomically?

Open
#115 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
2.6k
Forks
197
PR merge metrics
No merged PRs in 30d

Description

I see no equivalent to FileManager's replaceItemAt (https://developer.apple.com/documentation/foundation/filemanager/2293212-replaceitemat). This is equivalent to linux `mv dir1/old_name dir2/new_name`.

Is this possible? If not, could it be added? The use case is downloading a file to a temporary folder with a unique name, and then moving it to its true home and name upon successful download.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.