如何在手机SD卡或其他位置搜索文件 [英] How to search for files on phone sdcard or else where

查看:80
本文介绍了如何在手机SD卡或其他位置搜索文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在具有特定扩展名的移动用户上搜索文件.

I want to search for files on the users mobile with specific extensions.

我尝试搜索,但是找不到任何直接的API.

I tried searching but could not find any direct API's.

是否有特定的API或实现该API的乏味方法. 还是有一种机制可以调用linux进行查找或类似的操作

Is there a specific API's or is there tedious way of achieving the same. Or is there a mechanism to call linux calls for find or something similar

谢谢

推荐答案

您可以通过Environment.getExternalStorageDirectory()找到用户的SD卡,然后可以遍历该SD卡以查找所需的内容.

You can find the user's SD card via Environment.getExternalStorageDirectory(), which you can then traverse to find what you need.

这篇关于如何在手机SD卡或其他位置搜索文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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