Java tutorial
//package com.java2s; import java.io.File; public class Main { public static boolean existFile(String path, String fileName) { File filePath = new File(path); if (!filePath.isDirectory()) { filePath.mkdirs(); } File file = new File(fileName); if (!file.exists() || !file.isFile()) { return false; } return true; } }