Environment.getDataDirectory().getPath()=/data
Environment.getDownloadCacheDirectory().getPath()=/cache
Environment.getExternalStorageDirectory()=/storage/emulated/0
Environment.getRootDirectory().getPath()=/system
//警报的铃声
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_ALARMS).getPath()=/storage/emulated/0/Alarms
//相机拍摄的图片和视频保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getPath()=/storage/emulated/0/DCIM
//下载文件保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath()=/storage/emulated/0/Download
//电影保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getPath()=/storage/emulated/0/Movies
//音乐保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC).getPath()=/storage/emulated/0/Music
//通知音保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_NOTIFICATIONS).getPath()=/storage/emulated/0/Notifications
//下载的图片保存的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath()=/storage/emulated/0/Pictures
//用于保存podcast(博客)的音频文件
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PODCASTS).getPath()=/storage/emulated/0/Podcasts
//保存铃声的位置
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES).getPath()=/storage/emulated/0/Ringtones
context.getCacheDir().getPath()=/data/data/包名/cache
context.getFilesDir().getPath()=/data/data/包名/files
context.getObbDir().getPath()=/storage/emulated/0/Android/obb/包名
context.getExternalCacheDir().getPath()=/storage/emulated/0/Android/data/包名/cache
context.getExternalFilesDir(Environment.DIRECTORY_ALARMS).getPath()=/storage/emulated/0/Android/data/包名/files/Alarms
context.getExternalFilesDir(Environment.DIRECTORY_DCIM).getPath()=/storage/emulated/0/Android/data/包名/files/DCIM
context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getPath()=/storage/emulated/0/Android/data/包名/files/Download
context.getExternalFilesDir(Environment.DIRECTORY_MOVIES).getPath()=/storage/emulated/0/Android/data/包名/files/Movies
context.getExternalFilesDir(Environment.DIRECTORY_MUSIC).getPath()=/storage/emulated/0/Android/data/包名/files/Music
context.getExternalFilesDir(Environment.DIRECTORY_NOTIFICATIONS).getPath()=/storage/emulated/0/Android/data/包名/files/Notifications
context.getExternalFilesDir(Environment.DIRECTORY_PICTURES).getPath()=/storage/emulated/0/Android/data/包名/files/Pictures
context.getExternalFilesDir(Environment.DIRECTORY_PODCASTS).getPath()=/storage/emulated/0/Android/data/包名/files/Podcasts
context.getExternalFilesDir(Environment.DIRECTORY_RINGTONES).getPath()=/storage/emulated/0/Android/data/包名/files/Ringtones
context.getDatabasePath("XXX").getPath()=/data/data/包名/databases/XXX
context.getPackageCodePath()=/data/app/包名-2/base.apk
context.getPackageResourcePath()=/data/app/包名-2/base.apk
Android系统默认路径
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- Environment类大揭秘 Environment有如下8个get方法: Environment.getExt...