go-fs
Filesystem library for Go, implementing FAT filesystems so far.
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.
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.
Where it fits
- Learn how FAT filesystems work by reading and exploring disk images in Go.
- Browse folders and files inside a FAT disk image from a Go application.
- Create and write files into a FAT filesystem image for a hobby project.