Basic Steps to File I/O:
-
Open the file:
--Opening a file returns a files "handle" from the system.
-
Perform I/O tasks:
--Given the file handle, you can access the file with
read,
write and/or seek
operations.
-
Close the file:
--Closing the file flushes buffers and break the connection
between the handle and the file.