AndroidトレーニングセンターのWebサイトでこのコードを見ました:
boolean hasExternalStoragePrivateFile() {
// Get path for the file on external storage. If external
// storage is not currently mounted this will fail.
File file = new File(getExternalFilesDir(null), "DemoFile.jpg");
if (file != null) {
return file.exists();
}
return false;
}
それは Android でnew File()
null を返すことができるということですか?