I'm following previous advice to write to a file in Xcode 7 with Swift 2, e.g.
let loopOmega = " endloop"
try loopOmega.writeToFile(path, atomically: false, encoding: NSUTF8StringEncoding)
let facetOmega = " endfacet"
try facetOmega.writeToFile(path, atomically: false, encoding: NSUTF8StringEncoding)
When I track down the file in the simulator's file space, I see only the final line, which makes me think that the buffer is getting overwritten, as opposed to going to the file. How can I flush the buffer with each line?