Creating a "virtual" path (/bla) in Mac OS X and Linux that calls custom code
- by Michael Stum
Just something I'd like to play with, I would like to create a "virtual" file/directory in the File System of Linux or Mac OS X (Not sure if I can share the same code - does POSIX help?), for example /foo and then perform custom code when something is read or written to it.
Similar how /dev/null allows for stuff like
echo "Hello!" > /dev/null
I don't care if it's in /dev, /proc or anywhere else, as said it's mainly something to play with...