How to get the name of the directory where the app is installed?

What file (relative to the app folder) are you looking for?

I checked the implementation of the URL generator and it should do, what you are looking for.

Ideally you could share your code or at least some contiguous snippets.

Christian