Android 应用文件路径

Log.i("Environment.getDataDirectory:", Environment.getDataDirectory().getAbsolutePath());
		Log.i("Environment.getExternalStorageDirectory:", Environment.getExternalStorageDirectory().getAbsolutePath());
		Log.i("Environment.getRootDirectory:", Environment.getRootDirectory().getAbsolutePath());
		Log.i("Environment.getDownloadCacheDirectory:", Environment.getDownloadCacheDirectory().getAbsolutePath());
		Log.i("getCacheDir:", this.getCacheDir().getAbsolutePath());
		Log.i("getFilesDir:", this.getFilesDir().getAbsolutePath());
		Log.i("getObbDir:", this.getDir("demo", Context.MODE_WORLD_WRITEABLE).getAbsolutePath());
		Log.i("getObbDir:", this.getObbDir().getAbsolutePath());

结果:



 

猜你喜欢

转载自markjoker.iteye.com/blog/2209451