whatisgithub

What is go-fs?

mitchellh/go-fs — explained in plain English

Analysis updated 2026-07-03 · repo last pushed 2018-05-08

92GoAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A Go library that lets programs read and write FAT filesystems by treating a regular file like a disk drive, mainly built as a learning project rather than for production use.

Mindmap

mindmap
  root((repo))
    What it does
      Reads FAT filesystems
      Writes FAT filesystems
      Treats files as disks
    Limitations
      No delete or rename
      Disk space never reclaimed
      FAT32 incomplete
    Tech stack
      Go
      FAT12
      FAT16
    Use cases
      Learn filesystem internals
      Browse disk images
      Hobby projects
    Audience
      Curious developers
      Students
      Tinkerers
Click or tap to explore — scroll the page freely

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

Learn how FAT filesystems work by reading and exploring disk images in Go.

USE CASE 2

Browse folders and files inside a FAT disk image from a Go application.

USE CASE 3

Create and write files into a FAT filesystem image for a hobby project.

What is it built with?

GoFAT12FAT16

How does it compare?

mitchellh/go-fsawuqing/backupxcybertec-postgresql/pg_hardstorage
Stars929688
LanguageGoGoGo
Last pushed2018-05-08
MaintenanceDormant
Setup difficultyeasyeasymoderate
Complexity2/53/54/5
Audiencedeveloperops devopsops devops

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

How do you get it running?

Difficulty · easy Time to first run · 5min

No external infrastructure needed, just import the Go library and provide a file to use as a disk image.

So what is it?

go-fs is a Go library that lets programs read and write FAT filesystems. FAT is the old file storage system that floppy disks and early hard drives used, and it still shows up in things like USB sticks and camera memory cards. This library lets a Go application treat a regular file as if it were one of those disks, opening it, browsing its folders, and creating files inside it. At a high level, you give the library a file on your computer, and it wraps that file so your code can interact with it like a little disk drive. You can read existing files and directories, create new ones, and write content to them. The library handles the bookkeeping of the FAT format internally, so your code just deals with files and folders in a familiar way. The author is upfront that this is more of a learning project than production-ready software. Reading works well, but writing has serious gaps. You can't delete or rename files, deleted space is never reclaimed so the "disk" just fills up over time, and there are corruption risks if errors occur mid-operation. FAT12 and FAT16 are fully implemented, but FAT32 support is incomplete. Someone might use this for educational purposes, like understanding how filesystems work under the hood, or for a hobby project that needs to poke around disk images. The README doesn't suggest practical real-world scenarios, and the author explicitly recommends against relying on it for anything important. It's essentially a working experiment that demonstrates how to build filesystem tooling from scratch in Go.

Copy-paste prompts

Prompt 1
Using the go-fs library in Go, write a program that opens a FAT16 disk image file, lists all directories and files, and prints their names.
Prompt 2
Using go-fs, create a Go program that takes a blank file, formats it as a FAT12 filesystem, creates a text file inside it, and writes content to that file.
Prompt 3
Using go-fs, write Go code that opens a FAT disk image, traverses the directory tree recursively, and prints the full path of every file it finds.
Prompt 4
Using go-fs, create a Go program that reads a FAT16 image from a USB stick dump and extracts all files to a local folder on disk.

Frequently asked questions

What is go-fs?

A Go library that lets programs read and write FAT filesystems by treating a regular file like a disk drive, mainly built as a learning project rather than for production use.

What language is go-fs written in?

Mainly Go. The stack also includes Go, FAT12, FAT16.

Is go-fs actively maintained?

Dormant — no commits in 2+ years (last push 2018-05-08).

How hard is go-fs to set up?

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

Who is go-fs for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.