It is a virtual file system runs on top of the Linux file system.
- The size of virtual disk is 512 MB.
- Code is written with respect to Linux file system and path hierarchy.
- You need to install GNU g++ compiler
sudo apt-get install g++
Compilation : run g++ main.cpp -o ibfs in the respective directory where source files are present.
Execution : run ./ibfs to start the project.
Operations outside the disk
create disk: Creates an empty disk of size 500 MB.mount disk: Opens the specified disk for various file operations.exit: Close the application.
After opening/mounting a particular disk, below mentioned operations can be performed on the disk
create file: creates an empty text file.open file: opens a particular file in read/write/append mode as specified in input, multiple files can be opened simultaneously.read file: Displays the content of the file.write file: Write fresh data to file(override previous data in file).append file: Append new data to an existing file data.close file: Closes the file.delete file: Deletes the file.list of files: List all files present in the current disk.list of opened files: List all opened files and specify the mode they are open in.unmount: Closes the currently mounted disk.
- While creating an empty disk a unique name will be given to it which will be used to mount it.
- You may have multiple disks. You will open only 1 disk at a time.