Anonymous user
Take notes on the command line: Difference between revisions
m
→{{header|Swift}}
(add swift) |
|||
Line 1,663:
<lang Swift>import Foundation
let args = Process.arguments
let manager = NSFileManager()
let currentPath = manager.currentDirectoryPath
Line 1,677 ⟶ 1,678:
// Print the file if there are no args
if
let str = NSString(contentsOfFile: currentPath + "/notes.txt", encoding: NSUTF8StringEncoding, error: &err)
println(str!)
Line 1,693 ⟶ 1,694:
var str = "\t"
for i in 1..<
str +=
}
|