As you know that files are used to store the required information for its later uses.
There are many file operations that can be perform by the computer system.
Here are the list of some common file operations:
Now let's describe briefly about all the above most common operations that can be performed with files.
The file is created with no data.
The file create operation is the first step of the file.
Without creating any file, there is no any operation can be performed.
File must has to be deleted when it is no longer needed just to free up the disk space.
The file delete operation is the last step of the file.
After deleting the file, it doesn't exist.
The process must open the file before using it.
The file must be closed to free up the internal table space, when all the accesses are finished and the attributes and the disk addresses are no longer needed.
The file read operation is performed just to read the data that are stored in the required file.
The file write operation is used to write the data to the file, again, generally at the current position.
The file append operation is same as the file write operation except that the file append operation only add the data at the end of the file.
For random access files, a method is needed just to specify from where to take the data. Therefore, the file seek operation performs this task.
The file get attributes operation are performed by the processes when they need to read the file attributes to do their required work.
The file set attribute operation used to set some of the attributes (user settable attributes) after the file has been created.
The file rename operation is used to change the name of the existing file.