-
Notifications
You must be signed in to change notification settings - Fork 0
ExFAT Filesystem
Microsoft's ExFAT filesystem for flash drives and large filesystems, supporting files larger than 4GB.
ExFAT (Extended File Allocation Table) is a filesystem designed by Microsoft for flash storage devices where NTFS is not suitable. It removes the 4GB file size limit of FAT32 and supports volumes larger than 2TB, making it ideal for SDXC cards, USB drives, and other removable media.
JNode's ExFAT implementation is a read-only driver (fs/src/fs/org/jnode/fs/exfat/)
that extends AbstractFileSystem<NodeEntry>. It reads the volume's boot sector,
upcase table, and cluster bitmap to enumerate the directory tree.
| Class / File | Role |
|---|---|
ExFatFileSystem.java |
Main filesystem implementation, extends AbstractFileSystem
|
ExFatSuperBlock.java |
Boot sector and main metadata structure |
ExFatFileSystemType.java |
FileSystemType plugin entry point for detection and mounting |
Node.java, NodeFile.java, NodeDirectory.java
|
Directory entry representation |
NodeEntry.java |
Raw directory entry parsing |
ClusterBitMap.java |
Cluster allocation bitmap |
UpcaseTable.java |
Uppercase conversion table for case-insensitive lookups |
DirectoryParser.java |
Directory tree traversal |
-
ExFatFileSystemType.create()probes the device by reading the boot sector -
ExFatSuperBlock.read()validates the filesystem signature and reads volume parameters - Root directory is parsed via
DirectoryParserto build theNodetree - Cluster bitmap and upcase table are located from the root directory
- Files and directories are accessed through the
Nodeabstraction
ExFAT directories are linear streams of NodeEntry records. Entries include:
- Volume GUID entry — identifies the filesystem
- Allocation bitmap entry — points to the cluster bitmap
- Upcase table entry — Unicode case conversion data
- File/directory entries — name fragments, timestamps, cluster allocation
- Stream extension entries — file size and first cluster
- File entry — attributes, timestamps, first entry hash
Names longer than 15 UTF-16 characters are split across multiple name entries. File hashes are computed to quickly locate entries.
- JNode's ExFAT driver is read-only — writes are not yet implemented
- ExFAT uses a timestamp format with 10ms resolution and a different epoch than FAT
- The upcase table is mandatory and used for all name comparisons
- Deleted files are immediately overwritten; there is no undelete mechanism
- FAT-Filesystem — FAT12/FAT16/FAT32 (ExFAT's predecessors)
- Filesystem-Layer — VFS, partition tables, filesystem drivers
- VFS-Layer — Virtual filesystem interface and path resolution
- FileSystemType — Plugin interface for filesystem detection and mounting