Java examples for File Path IO:Directory
Determining If a File or Directory Exists
import java.io.File; public class Main { public static void main(String[] args) { boolean exists = (new File("filename")).exists(); if (exists) { // File or directory exists } else {/* ww w .j av a 2 s . c o m*/ // File or directory does not exist } } }