I have deployed a .NET Core webapplication on a Ubuntu 16.04 LTS
server using nginx
.
I'd like to find this directory:
# Location source code
/home/user-0123456/webapp
From within this location:
// Location compiled code and source to outside world
/var/webapp
In this situation, user-0123456 is fixed, but the fix should be generic. So i.e., it could be different in the future - but you can assume there will always be one user.
I did came across this post, but both these lines:
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)
return /var/www
instead of /home/user-0123456/webapp
.
Question
So how can I find the root directory of my 'webapp'-dir in the home folder from inside another path?