Pages

Tuesday, March 16, 2010

Check whether a windows file exists or not (in Java)

    public boolean fileExists(String filePath)    {    //Start of fileExists function
        boolean flagExists=false;
        java.io.File file=new java.io.File(filePath);
        flagExists=file.exists();
        return flagExists;
    }//END of fileExists function

No comments:

Post a Comment