当前位置:   article > 正文

File文件路径_huitool fileutil.getabsolutepath

huitool fileutil.getabsolutepath
  1. String a = Environment.getDataDirectory().toString();
  2. String b = getFilesDir().getAbsolutePath();
  3. String c = getCacheDir().getAbsolutePath();
  4. String d = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath();
  5. String e = Environment.getExternalStorageDirectory().getPath();
  6. String f = getExternalFilesDir("Documents").getPath();
  7. Log.e(LOG_Info + "a: ", "Environment.getDataDirectory().toString():-----" + a);
  8. Log.e(LOG_Info + "b: ", "getFilesDir().getAbsolutePath():----- " + b);
  9. Log.e(LOG_Info + "c: ", "getCacheDir().getAbsolutePath():----- " + c);
  10. Log.e(LOG_Info + "d: ", "Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath():----- " + d);
  11. Log.e(LOG_Info + "e: ", "Environment.getExternalStorageDirectory().getPath():----- " + e);
  12. Log.e(LOG_Info + "f: ", "getExternalFilesDir(\"Documents\").getPath():----- " + f);

打印结果:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/819883
推荐阅读
相关标签
  

闽ICP备14008679号