Skip to content
Kango edited this page May 19, 2018 · 2 revisions

Code:


String filename = "foo.txt";
File f = new File(dataPath(filename));
if (f.exists()){  
    // do something
} 

If you need to look in a specific subdirectory, try:

Code:


  String filename = "foo.txt";
  File f = new File(dataPath("/subdirectory/" + filename));
  if (f.exists()) {  
    // do something
  }

by clone45
see

Clone this wiki locally