Here you can find the source of createDirIfDoesNotExist(String websitesDirPath)
public static void createDirIfDoesNotExist(String websitesDirPath)
//package com.java2s; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void createDirIfDoesNotExist(String websitesDirPath) { Path directoryPath = Paths.get(websitesDirPath); if (!Files.exists(directoryPath)) { try { Files.createDirectory(directoryPath); } catch (IOException e) { e.printStackTrace();// w ww.jav a 2s.com } } } }