Does ASP.NET Core offer any platform-independent way to access standard paths, such as where data or configure files are supposed to be saved? Modules such as Qt's QStandardPaths are very helpful to prepare Qt applications to be deployed in a platform-independent way, but unfortunately I haven't found any similar service in ASP.NET Core. Does anyone know if anything like that exists in the .Net core or ASP.NET Core platforms?
Asked
Active
Viewed 171 times
0
-
https://learn.microsoft.com/en-us/dotnet/api/system.io.path?view=netcore-2.1 – Joe Audette Nov 09 '18 at 11:50
-
@JoeAudette thanks for the link. However, `System.IO.Path` was designed to perform operations on path information. What I was looking for is something like Qt's `QStandardPaths`, which return which path should be used for certain uses such as, say, store config files. – RAM Nov 09 '18 at 12:19
1 Answers
1
You can use Environment.GetFolderPath.
This blog post provides more info on how the API behaves cross-platform.

Tom Deseyn
- 1,735
- 3
- 17
- 29