Skip to content

Commit a18f948

Browse files
committed
doc: add case sensitivity documentation for VFS overlay mode
Document that VFS is always case-sensitive internally and explain how this interacts with case-insensitive file systems in overlay mode.
1 parent c873f49 commit a18f948

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/api/vfs.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,19 @@ conventions (UTF-8 on most Unix systems, UTF-16 on Windows). This means the
400400
VFS inherits the underlying file system's encoding behavior for paths that
401401
fall through, while VFS-internal paths always use UTF-8.
402402

403+
**Case sensitivity:** The VFS is always case-sensitive internally. In overlay
404+
mode, this can cause unexpected behavior when overlaying a case-insensitive
405+
file system (such as macOS HFS+ or Windows NTFS):
406+
407+
* A VFS file at `/Data.txt` will not shadow a real file at `/data.txt`
408+
* Looking up `/DATA.TXT` will fall through to the real file system (not found
409+
in case-sensitive VFS), potentially finding a real file with different casing
410+
* This mismatch is intentional: the VFS maintains consistent cross-platform
411+
behavior rather than emulating the underlying file system's case handling
412+
413+
If case-insensitive matching is required, applications should normalize paths
414+
before VFS operations.
415+
403416
**Operation routing:**
404417

405418
* **Read operations** (`readFile`, `readdir`, `stat`, `lstat`, `access`,

0 commit comments

Comments
 (0)