系统默认路径位置

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值