code: public static boolean isFileExist(String filePath) {
  
          File f = new File(filePath);
  
          return f.exists() && !f.isDirectory();
      }
docs: Checks if is file exist.
  
  @param filePath
  the file path
  @return true, if is file exist