Simpler File System Project

Overview

In this project you will implement a small UNIX-like file system in C++. The file system lives inside a regular 128 KB disk file and must persist across program runs. Your code will manage a free block list, an inode table, a root directory, and file data blocks by reading and writing raw bytes in that disk file.

This is a constrained project on purpose. The goal is not to build a full production file system, but to practice the core ideas:

  1. Layouting data structures on disk.
  2. Serializing and de-serializing C/C++ structs.
  3. Managing free space.
  4. Mapping file names to metadata and data blocks.
  5. Preserving correctness across multiple operations.

Learning Objectives

By completing this project, you should be able to:

  1. Explain how a file system can be represented inside a binary file.
  2. Implement file creation, deletion, reading, writing, and directory listing.
  3. Reason about persistence and consistency of on-disk metadata.
  4. Validate error conditions before mutating durable state.

Getting Started

  1. Download the starter code.

    project.zip

  2. Unzip it with unzip -d PROJECT project.zip.

  3. Change into the new directory with cd PROJECT.

  4. Build the project by running: