我使用Xamarin開發我的應用程序。我看到很多答案,但沒有找到可以幫助我的東西。我如何獲得位於sdcard0中的應用程序文件夾的路徑?我想得到這樣的東西:/storage/sdcard0/Android/data/[MyApplication]/files
。如何獲取位於sdcard0中的應用程序文件夾的路徑?
我做了以下內容:
var path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
它給了我"/data/data/App1.Droid/files"
但它不是我要找的。
我正在使用Android Studio,也許你可以試試'Environme nt.getExternalStorageDirectory()。getAbsolutePath()' –
使用'getCanonicalPath()'。看到[這](http://stackoverflow.com/questions/11488754/whats-the-difference-between-canonicalpath-and-absolutepath)acc評論我的回答! ; D –