ext file I/O with Swift 3 (Quinn "The Eskimo!")
--
Message: 1
Date: Mon, 30 May 2016 09:11:41 +0100
From: "Quinn \"The Eskimo!\"" <eski...@apple.com>
To: Swift Users List <swift-users@swift
On 28 May 2016, at 19:05, Ken Burgett via swift-users
wrote:
> print(buf)
The trick here is to replace the above line with:
print(String(validatingUTF8: buf))
`fgets` sets up `buf` to hold a C string, so you have to convert it to a Swift
string. How do you do
Hi all,
I am trying to understand how Swift 3 File I/O works in a linux
environment. I put together a trivial test program using what I
can glean from the few examples I can find. See below.
===
import Glibc
import Foundation
let filename = Process.arguments[1]