In the context of file systems explain the purpose of the op
In the context of file systems, explain the purpose of the open and close operations (other than the obvious).
Solution
The purpose of the open() and close() operations is: •
The open() operation informs the system that the named file is about to become active. •
The close() operation informs the system that the named file is no longer in active use by the user who issued the close operation.
When a file is opened, a stream object is constructed to serve as the file system\'s operations on the stream are reflected by operations on the file in the file system.
The act of closing the file (actually, the stream) ends the association; the transaction with the file system is terminated, and input/output may no longer be performed on the stream.
