Android 路径目录相关

先说下应用管理里的清除数据和清除缓存:

清除数据,会清除以下目录: /data/data/包名/
清除缓存,会清除以下目录: /data/data/包名/cache


context.getFilesDir=[/data/user/0/包名/files]

context.getCacheDir=[/data/user/0/包名/cache]

context.getObbDir=[/storage/emulated/0/Android/obb/包名]

context.getExternalCacheDir=[/storage/emulated/0/Android/data/包名/cache]

context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)=[/storage/emulated/0/Android/data/包名/files/Download]

Environment.getExternalStorageDirectory()=[/storage/emulated/0]
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)=[/storage/emulated/0/Download]

Environment.getDataDirectory()=[/data]


File[] files = context.getExternalFilesDirs(null);
files[0] =/storage/emulated/0/Android/data/包名/files(内置卡)
files[1] =/storage/5244-488A/Android/data/包名/files(外置sd卡)

你可能感兴趣的:(Android 路径目录相关)