init(fileDescriptor:closeOnDealloc:)
Creates and returns a file handle object associated with the specified file descriptor and deallocation policy.
Declaration
init(fileDescriptor fd: Int32, closeOnDealloc closeopt: Bool)Parameters
Return Value
An initialized file handle object.
Discussion
If flag is false, the file descriptor you pass in to this method isn’t owned by the file handle object. In such a case, you’re responsible for closing the file descriptor at some point after disposing of the file handle object. If you want the file handle object to close the descriptor for you automatically, pass true for the flag parameter.