Android数据存储路径位置

    xiaoxiao2021-12-03  17

    File filepathq = getFilesDir(); File filepathw = getCacheDir(); File filepathe = getExternalCacheDir(); File filepathr = getExternalFilesDir("dsaf"); File filepatht = Environment.getExternalStorageDirectory(); File filepathy = Environment.getExternalStoragePublicDirectory("egvd"); Log.e("debug", "getFilesDir="+filepathq.getAbsolutePath()); Log.e("debug", "getCacheDir="+filepathw.getAbsolutePath()); Log.e("debug", "getExternalCacheDir="+filepathe.getAbsolutePath()); Log.e("debug", "getExternalFilesDir="+filepathr.getAbsolutePath()); Log.e("debug", "getExternalStorageDirectory="+filepatht.getAbsolutePath());

    Log.e("debug", "getExternalStoragePublicDirectory="+filepathy.getAbsolutePath());

    打印结果:

     getFilesDir=/data/user/0/com.example.mtonlyidentification/files getCacheDir=/data/user/0/com.example.mtonlyidentification/cache getExternalCacheDir=/storage/emulated/0/Android/data/com.example.mtonlyidentification/cache  getExternalFilesDir=/storage/emulated/0/Android/data/com.example.mtonlyidentification/files/dsaf getExternalStorageDirectory=/storage/emulated/0 getExternalStoragePublicDirectory=/storage/emulated/0/egvd

    转载请注明原文地址: https://ju.6miu.com/read-679897.html

    最新回复(0)