Windows has several "virtual folders" and "special folders" (Wikipedia's names for them) that change the way the file system works. For example, the Desktop
folder acts like the root of the file system hierarchy in some circumstances, even though C:/
is the drive, also called the partition, that the entire file system is on, and therefore logically Desktop
should be under C:/
. Screenshots: There are also the
Library
folders. Also, with msysGit
and Cygwin
on your computer, the program's folder then magically becomes the root of the file system.
I'm sure there are instances on other OS's, but I only really work with Windows, although it seems Linux is much less abstracted.
How do applications do this? Is it just a really complicated shell script, or something that only affects certain programs (Wikipedia says Desktop
is only the root folder in Windows Explorer
, for example)? Is it similar to how on Linux all folders are "mounted", even the root folder? Even if the OS developers don't usually give away their secrets, I would still like to know the basic method, if possible.