■ サンプルコード
Console.WriteLine("{0}: {1}", Environment.DirectoryAlarms, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryAlarms).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryDcim, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryDocuments, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDocuments).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryDownloads, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDownloads).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryMovies, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryMovies).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryMusic, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryMusic).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryNotifications, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryNotifications.Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryPictures, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryPictures).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryPodcasts, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryPodcasts).Path);
Console.WriteLine("{0}: {1}", Environment.DirectoryRingtones, Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryRingtones).Path);
■ 結果
Alarms: /storage/emulated/0/Alarms
Documents: /storage/emulated/0/Documents
Download: /storage/emulated/0/Download
Movies: /storage/emulated/0/Movies
Music: /storage/emulated/0/Music
Notifications: /storage/emulated/0/Notifications
Pictures: /storage/emulated/0/Pictures
Podcasts: /storage/emulated/0/Podcasts
Ringtones: /storage/emulated/0/Ringtones
■ サンプルコード
Console.WriteLine("{0}: {1}", "RootDirectory", Environment.RootDirectory.Path);
Console.WriteLine("{0}: {1}", "DataDirectory", Environment.DataDirectory.Path);
Console.WriteLine("{0}: {1}", "DownloadCacheDirectory", Environment.DownloadCacheDirectory.Path);
Console.WriteLine("{0}: {1}", "ExternalStorageDirectory", Environment.ExternalStorageDirectory.Path);
■ 結果
RootDirectory: /system
DataDirectory: /data
DownloadCacheDirectory: /cache
ExternalStorageDirectory: /storage/emulated/0
■ サンプルコード
Console.WriteLine("{0}: {1}", "ExternalStorageState", Environment.ExternalStorageState);
Console.WriteLine("{0}: {1}", "IsExternalStorageEmulated", Environment.IsExternalStorageEmulated);
Console.WriteLine("{0}: {1}", "IsExternalStorageRemovable", Environment.IsExternalStorageRemovable);
■ 結果
ExternalStorageState: mounted
IsExternalStorageEmulated: true
IsExternalStorageRemovable: false
■ using
using Android.OS;