Learning & reference

File systems, explained for QA & developers

A file system decides how bytes become named files. Every file system has different rules for size, names, case and permissions. Those differences are where cross-platform bugs live. Here's what each one actually does, and the traps to test for.

What a file system actually does

Below the folder view, the file system is the bookkeeping layer between raw disk blocks and the files you see. Four jobs matter most for testing:

🏷️

Naming & directories

Maps human names to data, defines legal characters, case rules, max name/path length and how folders nest.

📇

Metadata

Size, timestamps, owner, and extras like NTFS alternate data streams or macOS resource forks / extended attributes.

🔑

Permissions

Who can read/write/execute: POSIX rwx bits, or richer Access Control Lists (ACLs) on NTFS/APFS.

🛡️

Integrity

Journaling or copy-on-write so a crash mid-write doesn't corrupt the volume; checksums on modern systems.

Local file systems, side by side

The disk formats on laptops, servers, USB sticks and SD cards. Scroll sideways on a phone.

Scroll the table sideways for more columns

File system Native to Max file size Case Permissions Journaling Watch out for
NTFSWindows Windows (2000+) ≈16 TB (up to 8 PB) insensitive
preserves case
ACLs Yes Alternate data streams; reserved names (CON); 260-char legacy path cap
APFSmacOS / iOS macOS 10.13+ (2017) 8 EB insensitive
case-sensitive variant
POSIX + ACLs Copy-on-write Stores names as Unicode NFD; snapshots & clones look like copies but share blocks
ext4Linux Linux (default) 16 TB sensitive POSIX Yes File.txt and file.txt coexist, which breaks when synced to Windows/Mac
exFATremovable USB / SD cards 16 EB insensitive none No No permissions or journaling: fine for big files across OSes, risky for live data
FAT32universal Everything (legacy) 4 GB insensitive none No A single file can't reach 4 GB, which is the classic "file too large" copy error. Volume capped ~2 TB
HFS+old macOS macOS pre-2017 8 EB insensitive
HFSX is sensitive
POSIX + ACLs Yes Superseded by APFS; still seen on old drives & Time Machine disks

NTFSNew Technology File System

Windows' default since Windows 2000. Rich ACL permissions, journaling, compression, encryption (EFS) and alternate data streams (hidden data attached to a file).

QA trap: ADS means a file can carry hidden content your size/hash checks miss (file.txt:secret). Downloads get a Zone.Identifier stream that triggers the "file from the internet" block.

APFSApple File System

Default on modern Macs, iPhones and iPads. Copy-on-write, instant snapshots, space-sharing containers, and cheap file clones that share blocks until edited.

QA trap: stores filenames in Unicode NFD, so a name typed as NFC on Windows won't byte-match, so "file not found" for a name you can clearly see.

ext4Fourth Extended File System

The Linux workhorse. POSIX permissions, journaling, extents, and the fewest surprises: it stores names as raw bytes and is fully case-sensitive.

QA trap: case sensitivity is the big one. A repo with README.md and Readme.md is valid on Linux but silently merges to one file on Windows/Mac.

💾

exFAT & FAT32Removable / interchange

The formats on USB drives and SD cards. No permissions, no journaling: maximum compatibility, minimum safety. exFAT lifts FAT32's limits.

QA trap: FAT32 rejects any single file ≥ 4 GB. A 4 GB video or backup that copies fine to NTFS/APFS fails on a FAT32 stick with a confusing error. Always test this path.

HFS+Mac OS Extended (Journaled)

Apple's file system from 1998 until APFS replaced it in 2017. Journaled, with POSIX permissions plus ACLs, but no copy-on-write, no snapshots and no native cloning. You still meet it on older external drives, bootable clones and Time Machine backup disks.

QA trap: like APFS it stores filenames in Unicode NFD, so the same normalisation mismatch bites. Its case-sensitive variant (HFSX) is a separate format: a drive formatted HFSX can hold File.txt and file.txt side by side, which then collide the moment they are copied to a normal Mac or Windows volume.

POSIX: a standard, not a file system

People say "a POSIX file system", but POSIX is a specification: the rules an operating system follows for files, paths and permissions. It's why Linux and macOS feel alike, and why Windows doesn't.

📜

What POSIX defines

POSIX (Portable Operating System Interface) standardises the file API so the same program works across Unix-like systems. For files it pins down: a single /-rooted tree with / as the only separator; case-sensitive byte-string names (anything except / and NUL); the rwx owner/group/other permission model; and semantics like being able to delete or rename a file that's still open.

Why it matters: Windows is not POSIX. It uses \, is case-insensitive, blocks : * ? " < > | and reserved names, and locks open files. Most "works on my Mac/Linux, breaks on Windows" bugs are really POSIX-vs-Windows differences. See the filename compatibility matrix for the full list.

Network & shared storage

Beyond the local disk, files are also served over the network. These are protocols and devices, not disk formats. They still add their own rules on top of whatever file system sits underneath.

Protocol

SMB / CIFS

Windows-native file sharing: mapped drives like \\server\share. Also spoken by macOS and by Linux via Samba. Carries Windows-style rules (case-insensitive, reserved names) plus file locking.

Protocol

NFS

Network File System: the Unix/Linux way to mount a remote directory as if it were local. POSIX semantics, case-sensitive, with uid/gid-based permissions that must map correctly between client and server.

Device

NAS

Network-Attached Storage: an appliance full of disks that serves files to everyone on the network over SMB and/or NFS. It isn't a file system itself; internally it runs ext4, Btrfs or ZFS and exposes shares.

Device

SAN

Storage-Area Network: serves raw block storage (like a bare disk) over a fast network. The client formats it with its own file system. Contrast with NAS, which serves ready-made files.

Service

Object storage (S3 / R2)

Not a file system: a flat key→object store over HTTP. No real folders (just / in key names), no rename, no partial in-place writes. This very site is served from it.

Protocol

AFP

Apple Filing Protocol: the legacy Mac sharing protocol, now deprecated in favour of SMB. You'll still meet it on old NAS boxes and Time Machine setups.

⚠️

What changes when storage goes over the network

Locking is advisory and protocol-specific, so two clients can clobber each other's writes. Latency turns fast local operations into timeouts and partial writes. Case & Unicode rules follow the underlying file system, so a Linux NFS export can hold names a Windows SMB client can't open. Permissions mean different things (NFS uid/gid vs SMB ACLs) and often need mapping.

QA trap: test the same upload/download flow against a network share, not just a local disk. Path length, locking, interrupted transfers and permission mapping all behave differently.

Prove your app handles the differences

Every quirk above has a matching test file: an empty file, a 4 GB+ file, case-colliding names, NFC vs NFD Unicode, reserved names and more.

→ Browse the test files Filename compatibility →

More from Learning

Guides and references for test data, file handling and AI evals. All free, no sign-up. See the full hub.

Synthetic data for AI evalsWhat you can download, what you buildRAG test corpusDocuments with extraction trapsJSONL for evalsThe format, and ten ways it breaksMock API for agentsRecords, pagination, failures on demandSafe test dataReserved domains, IPs, numbers & cardsSynthetic PIIFake people that reach nobodyTest card numbersEvery brand, declines, 3D SecureTest phone numbersReserved US, UK and Australian rangesReserved IP addressesDocumentation ranges and SSRF casesExample domains.test, .invalid, example.com, and trapsQA test stringsUnicode, emoji, injection & edge casesFilename compatibilityWhat breaks across Windows, Mac & LinuxFile signaturesMagic numbers that identify every formatCharacter encodingsUTF-8, UTF-16, BOM & normalizationUpload validationThe checklist, with a file for each checkMIME typesThe right Content-Type for every extensionHTTP status codesEvery code and when you actually see itDates & timesISO 8601, epoch, Excel serials, DSTHTTP headersContent-Type, Disposition, Range, CORSRegex cheat sheetSyntax, flags and ready-made patternsGenerate files (CLI)Make test files on any OSCrypto & certificatesSSL/PEM, hashing, encryptionWeb app testingWhat to test, with a file for each caseDesktop app testingPaths, names, encodings and savingMobile app testingPickers, photos, flaky networksCLI testingArguments, pipes and exit codesLarge file upload testingDefault limits, 413s and exact sizes1 GB test file1 GB and 2 GB, with SHA-25610 GB test fileMake one locally in secondsDownload speed test files10 MB to 2 GB of random data