Last active
October 16, 2019 16:24
-
-
Save andrewwoz/709398065c7b3cb3717435122729481e to your computer and use it in GitHub Desktop.
[Creating hard links to file in swift] #fs
This file contains hidden or 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 fs = FileManager.default | |
| let docsURL = ... | |
| let articleURL = docsURL.appendingPathComponent("article.txt") | |
| let linkedArticle = docsURL.appendingPathComponent("link_article.txt") | |
| try? fs.linkItem(at: articleURL, to: linkedArticle) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment