Ejemplo n.º 1
0
  /**
   * Checks whether the folder exists for fname, and creates it if neccessary.
   *
   * @param fname folder name.
   * @throws IOException an IO exception.
   */
  public static void checkFolderForFile(String fname) throws IOException {

    if (fname.lastIndexOf(File.separator) > 0) {
      String folder = fname.substring(0, fname.lastIndexOf(File.separator));
      Helper.directoryCheck(folder);
    }
  }