Ever seen /proc in Linux? It’s the best-known “synthetic filesystem”, a set of “files” and “folders” on your computer that don’t actually map to anything on a real disk. Instead, /proc controls the processes on your computer.
Synthetic filesystems are a powerful and underused interface: there are tons of programming tools and commands to work with files, and once you have a synthetic filesystem, you can use all of them right away!
In this talk, I’ll go over four other synthetic filesystems: GrabFS, which exposes screenshots of how all your Mac windows look right now, YTFS, which exposes YouTube videos as video files on your computer, btfs, which lets you mount a BitTorrent file and lazily downloads the pieces you want for you, and WikipediaFS, where you can view and edit Wikipedia articles as files.
For each synthetic filesystem, I’ll show you one cool trick you get for free just because it’s a filesystem and not just a Web service or isolated program.
Finally, I’ll talk about some general advantages and disadvantages of this approach, which was pioneered by the Plan 9 OS in the early 1990s.