【发布时间】:2015-10-03 13:01:17
【问题描述】:
我想做与in this question 相同的操作,但在 Android 上,我想返回完整的文件路径 If it exists= true in EditText ? 我如何以及在何处放置代码
EditText txt11 = (EditText) findViewById(R.id.editText11);
txt11.setText(ss2 , TextView.BufferType.EDITABLE);
获取完整的文件路径
// your directory
File f = new File("C:\\example");
File[] matchingFiles = f.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith("temp") && name.endsWith("txt");
}
});
【问题讨论】:
-
你想要sd卡的文件路径对吗?
-
我已经重读了很多遍,但我仍然不明白你的意思。 EditText 与文件路径有什么关系?请慢慢来,想想,再想想,然后尝试更清楚地重新表述。
-
感谢您的评论,我真的很抓紧时间,我再次思考,我得到了我想要的 >>> 感谢您的回复 >> 问候
标签: android