This project consists of a FAT16 reader implemented in C. It reads and displays information from a FAT16 file system image.
- Reads and displays the Boot Sector information
- Reads and displays the Root Directory entries
- Reads and displays file contents from specified clusters
The boot sector structure is defined by the BootSector struct, which contains information like bytes per sector, sectors per cluster, number of FATs, and more.
The directory entry structure is defined by the EntryInDirectory struct, which contains information like file name, attributes, creation time, and more.
The long directory entry structure is defined by the LongDirectoryEntry struct, which is used for long file names.
Opens the FAT16 image file.
Sets the file offset.
Reads data from the file.
Prints the Boot Sector information.
Prints a Root Directory entry.
Prints file content.
Closes the FAT16 image file.
-
Compile the code using
gcc:gcc -o fat16reader fat16reader.c
-
Run the executable:
./fat16reader
-
Follow the prompts to interact with the FAT16 reader.
~ Year 2 Operating Systems coursework