I am currently working on a basic chatroom system for my college using text files, allowing everyone to save chatrooms in their area and share them with others. For this to work I need to get the actual directory of each users file on the server and not their local (relative) directory.
My college has a layout of each users E:\ drive being equal to \ServerName\Student\ (StudentNameHere)\ and in the past I have just been using .Replace("E:\","\\ServerName\Student\"+Enviroment.Username +"\")
But upon finding out that my college has different locations such as instead of Student lets say Student1, it makes my code more prone to breaking.
I have tried using
Path.GetFullPath(<File in this Users Directory>);
But it's only returned the path relative to users directory and not to the server, I don't know the type of link they used, but I thought symbolic would be good practice, tho trying this same command again on my own pc which I know has junction links for visual studio source/repos, didn't mention it's true (absolute) path either, any help on this would be much appreciated as this will fix a lot of bugs in my code and hopefully be a clean way to fix it all up as well, Thank You.