When I do File.ReadAllLines("some/path"), I get a message in the console saying it can’t find “/home/*user*/Actual/Project/Path/some/path”. This makes it impossible to read a file outside of the project. Is this an issue with the Linux editor, or is it by design?
This is the normal behavior.
1 Like
If you want the home folder of the current user you can use the SpecialFolder enumeration like this:
string homeFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
On Linux this gives the user’s home folder. It probably gives the “Documents” folder on Windows and possibly something else on OSX, so keep that in mind. You may want to use compiler flags for each system to get the different paths.
Hope this helps ![]()
1 Like
Thanks, that worked!