Skip to content

Instantly share code, notes, and snippets.

@zuzkins
Created September 12, 2017 08:15
Show Gist options
  • Save zuzkins/1959774d4ec1a71cb2d2a7fd07a879bd to your computer and use it in GitHub Desktop.
Save zuzkins/1959774d4ec1a71cb2d2a7fd07a879bd to your computer and use it in GitHub Desktop.
Simple example to trigger the usage of setattr_x function on a file
let dest = "/tmp/m/a"
let src = "/tmp/m/b"
let fileManager = FileManager();
let targetURL = URL.init(fileURLWithPath: dest)
let srcURL = URL.init(fileURLWithPath: src)
do {
try fileManager.replaceItemAt(targetURL, withItemAt: srcURL)
} catch {
print(error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment