Android获取相关目录

来源:互联网 发布:sql注入用户名密码 编辑:程序博客网 时间:2024/06/06 02:49
protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_main);        System.out.println(Environment.getDataDirectory().getAbsolutePath());        System.out.println(Environment.getRootDirectory().getAbsolutePath());        System.out.println(Environment.getDownloadCacheDirectory().getAbsolutePath());        System.out.println(Environment.getExternalStorageDirectory().getAbsolutePath());    }///*01-07 13:02:17.354 30959-30959/com.example.jacy.myapplication I/System.out: /data01-07 13:02:17.354 30959-30959/com.example.jacy.myapplication I/System.out: /system01-07 13:02:17.354 30959-30959/com.example.jacy.myapplication I/System.out: /data/cache01-07 13:02:17.358 30959-30959/com.example.jacy.myapplication I/System.out: /storage/emulated/0*/
原创粉丝点击