In order to not to run into an XY-Problem, here is the purpose I want to achieve:
I just want to have a folder with dynamically mangled names of an original source folder.
original folder:
webmaster@dev:~$ tree demo
demo
├── FileOne
├── FileTwo
└── FolderOne
├── FileOne
└── FileTwo
folder with mangled names
webmaster@dev:~$ tree demo-symlinks/
demo-symlinks/
├── file-one
├── file-two
└── folder-one
├── file-one
└── file-two
I do not want to touch the original source.
I dislike to watch the filesystem and run an update routine on each change. (This was my first approach in the past)
I want to have some instant reflection instead.
My idea is to setup or develop some virtual reflection filesystem similar to /proc or /sys and mount it on an empty folder.
The questions is not about the actual name mangeling, I can fit it to my needs on my own.
Actually, my question is:
How can I implement my own virtual filesystem? Since I do not have any clue how to start doing so, I need some first approach. Any basic C/C++ code example (or arbitrary languages) providing just the original names again would be fine. The nodes do not mandatorily have to be symlinks, I just want do access the original files by another name/path. Of course if there already is some installable ready-to-use solution, it would be preferable.
Any other solution achieving the desired points above is welcome.