How would one even abstract a filesystem..?

Why

Before explaining how, allow me to explain why to implement an interface to abstract the filesystem. The most surface reason for this is:
On a Windows filesystem, files are on a folder like so: C:\Users\You\Game\data;
On a Linux filesystem, it would look more like: /home/you/game/data;
On a PS Vita, (if I’m not mistaken) it looks like: app0:/data (app0 being the game’s package id);
In a Browser (WASM for instance), they are in virtual memory.

Can you see the problem? Different systems handle files differently. The immediate benefit of abstracting the filesystem is letting the developer choose data/config.json without needing to worry if the forward slash will work on windows, or they have to do the cursed \\ between directories and write a big if/else chain for each OS they plan to support, and this and that, and that, and..! I think you get the point.

How

Ask the VFS (Virtual File System <- read this post to understand how it’s done) for file X and you get file X - no OS-specific worries.

Filesystem abstraction already seems reasonable to implement, but what if I told you there’s even better reasons to implement it?

Goodbye

Next up… The “Priority Stack”, it will certainly convince you that this is worth implementing! See ya there!