Last active
July 26, 2017 03:14
-
-
Save transitorykris/66633bf834fb0d1eaa822cd3f8a1cbb0 to your computer and use it in GitHub Desktop.
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
// With appropriate values for userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint, and fileName | |
let client = SpinnerNewClient(userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint) | |
var contents: Data | |
do { | |
try contents = upspin.client.get(fileName) | |
} catch { | |
fatalError("failed to get file: \(error)") | |
} | |
if let contentsString = String(data: contents, encoding: .utf8) { | |
print(contentsString) | |
} else { | |
fatalError("unable to convert data into a string for display") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment