From the ‘don’t try this at home’ files

Source hidden to protect the guilty (who otherwise write very good code, but this jumped out) let urls = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask) print(urls[urls.count-1] as NSURL) For the searchMask .libraryDirectory, this function always returns an array containing a single URL, [file:///Users/username/Library/] so urls[urls.count-1] will give you urls[0], but it’s not clear from the code that […]