Adopting Swift File Operations
Migrate existing C code to Swift, using the file operations provided by the System module.
Overview
The C functions for file operations map to Swift as follows:
close⟶ close()lseek⟶ seek(offset:from:)read⟶ read(into:retryOnInterrupt:)write⟶ write(_:retryOnInterrupt:)