dommer
dommer

Reputation: 19810

In Mono, how do I get the path to the Documents folder on a Mac (Snow Leopard)?

I'm writing a Mono application and would like to find the full path of the Documents folder - e.g. /Users/johnsmith/Documents/. What's the best way to achieve this?

Upvotes: 3

Views: 1451

Answers (1)

Gonzalo
Gonzalo

Reputation: 21175

You can do this:

string doc_path = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Documents");

(Btw, for MonoTouch, It's just Environment.GetFolderPath (Environment.SpecialFolder.Personal)).

Upvotes: 6

Related Questions