# FAT filesystem

The unit at [fs/fat.fs] implements the Filesystem API [doc/fs/core] for the
FAT filesystem. It supports FAT12 and FAT16 but is still quite rough around the
edges.

* No FAT32
* No long filenames. It does gracefully ignore their presence though.
* No cluster reallocation. You are constantly leaking them through usage.

## Usage

You mount a FAT through "newfatfs ( drv -- fs )". For a given Drive
"drv" where the first sector has a proper FAT header, this call will yield a
struct that extends Filesystem and implements in entirely.

You might also be interested in [doc/fs/fatt], the "FAT tools" unit.

## direntry

In the code, a "direntry" is the address of a FAT entry structure in memory.
These references are short-lived because they're an address in the FAT sector
buffer which is very very often being overwritten.

File and directory IDs in FAT are the offset, on disk, of their corresponding
direntry.

