Created
September 12, 2017 08:15
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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