如何以编程方式移动、复制和删除 SD 上的文件和目录? [英] How to programmatically move, copy and delete files and directories on SD?

查看:28
本文介绍了如何以编程方式移动、复制和删除 SD 上的文件和目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以编程方式移动、复制和删除 SD 卡上的文件和目录.我已经进行了 Google 搜索,但没有找到任何有用的信息.

I want to programmatically move, copy and delete files and directories on SD card. I've done a Google search but couldn't find anything useful.

推荐答案

使用标准 Java I/O.使用 Environment.getExternalStorageDirectory() 访问外部存储(在某些设备上是 SD 卡)的根目录.

Use standard Java I/O. Use Environment.getExternalStorageDirectory() to get to the root of external storage (which, on some devices, is an SD card).

这篇关于如何以编程方式移动、复制和删除 SD 上的文件和目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆