Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}