Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to obtain Mac ~/Library/ path when using C# with MonoMac

I have a shared codebase (dll) that I use for both a Windows and Mac project. I'm looking for the best (supported) way of obtaining the path to the Mac Library folder so my project honors the Mac App Store requirements.

Right now I'm using Environment.SpecialFolder.LocalApplicationData to get the path but that doesn't give me the correct folder.

Is anyone aware what I should use to get ~/Library/ ?

like image 776
Keith Boynton Avatar asked Oct 05 '22 06:10

Keith Boynton


1 Answers

I didn't manage to find anything that mapped directly so I ended up coding the following:

Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library")
like image 127
Keith Boynton Avatar answered Oct 10 '22 01:10

Keith Boynton