explaingit

alistairfontaine/purity-fs

Analysis updated 2026-05-18

0C++Audience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A dependency free virtual filesystem built in pure C++20 that stores files inside one container file, with basic byte scrambling and a command line shell.

Mindmap

mindmap
  root((Purity-FS))
    What it does
      Virtual filesystem
      Block allocation table
      Byte scrambling
      Import export files
    Tech stack
      C++20
      Standard library only
    Use cases
      Learn filesystem internals
      Store files in one container
      Experiment with disk formats
    Audience
      C++ developers
      Students

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how a simple filesystem allocates and chains disk blocks.

USE CASE 2

Store a set of files inside a single portable container file.

USE CASE 3

Import files from the host machine into the virtual filesystem and export them back out.

USE CASE 4

Use the built in command shell to format, mount, and browse a virtual disk image.

What is it built with?

C++20

How does it compare?

alistairfontaine/purity-fsachanana/mavsdkalange/llama.cpp
Stars00
LanguageC++C++C++
Last pushed2024-05-20
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity3/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Just clone, run make, and start the compiled shell, no external dependencies to install.

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice stays with it.

In plain English

Purity-FS is a virtual filesystem written entirely in pure C++20, meaning it stores files and folders inside a single container file on your real disk instead of relying on the operating system's own filesystem. It uses only the C++ standard library, with no outside dependencies, so there is nothing to break when a third party library changes or gets removed. Inside that container, Purity-FS keeps track of files using a linked chain of fixed size blocks, similar to how a real disk allocates space in sectors. A block allocation table held in memory keeps note of which blocks belong to which file, and large files get split across many blocks as needed. Before writing file data to disk, the tool scrambles the bytes using a simple XOR bit mask, a lightweight technique that changes the bytes in a reversible way but is not a strong encryption method. The project also includes a small command line shell for working with the filesystem directly. From this shell you can format a new virtual disk file, mount an existing one, create and move between directories, list contents, and write or read files. Two more commands let you import a real file from your computer into the virtual filesystem, or export a file back out to your local disk. The README describes this as version 1.0.0, a stable release, and presents it as an educational and self contained project rather than a production storage system, since it relies on a simple XOR mask rather than genuine cryptographic protection. It is released under the MIT license, so anyone can use, modify, or distribute it freely.

Copy-paste prompts

Prompt 1
Walk me through building Purity-FS from source and running its command shell.
Prompt 2
Explain how the block allocation table in Purity-FS tracks which blocks belong to which file.
Prompt 3
Show me how the format and mount commands in Purity-FS work together to set up a virtual disk.
Prompt 4
Help me understand the XOR bit mask Purity-FS uses before writing file data to disk.

Frequently asked questions

What is purity-fs?

A dependency free virtual filesystem built in pure C++20 that stores files inside one container file, with basic byte scrambling and a command line shell.

What language is purity-fs written in?

Mainly C++. The stack also includes C++20.

What license does purity-fs use?

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice stays with it.

How hard is purity-fs to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is purity-fs for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.