Androidではファイルが存在するか以下で判定できます。
1 2 3 4 5 6 7 |
String filepath = Environment.getExternalStorageDirectory() + "/" + hoge.txt"; File file = new File(filepath); if(file.exists()) { // 存在する } else { // 存在しない } |
Androidではファイルが存在するか以下で判定できます。
1 2 3 4 5 6 7 |
String filepath = Environment.getExternalStorageDirectory() + "/" + hoge.txt"; File file = new File(filepath); if(file.exists()) { // 存在する } else { // 存在しない } |