Question

J'écris une application Mono et je voudrais trouver le chemin complet du dossier Documents - par exemple /Users/johnsmith/Documents/. Quelle est la meilleure façon d'y parvenir?

Était-ce utile?

La solution

Vous pouvez faire ceci:

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

(BTW, pour MonoTouch, Il est juste Environment.GetFolderPath (Environment.SpecialFolder.Personal)).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top