This project is an implementation of a block file system for the course "Operating Systems". This program makes it possible to store multiple files in a single file mimicking a drive. The block size is 4096B (4092B of content and 4B for the next address), and a file descriptor is 40B. Only one file can be stored in one block, meaning that there might occur a small fragmentation since some blocks might not be full. The permitted operations are:
- creating a disk with given name and capacity
- removing a disk with given name
- listing all files on the disk
- printing the content map of the disk
- copying a file from and onto the disk
- remove a file with given name from the disk
To compile the program, simply run the following command:
gcc -o mfs filesystem.cFrom there, the possibilites are endless. You can check the detailed usage by running:
./mfs --help