/** * Creates a new directory specifying components of the location. * * <p>Calls through to {@link #createDirectory(String)} */ public File createDirectory(String... location) throws IOException { Resource directory = get(Paths.path(location)); return Resources.createNewDirectory(directory); }
/** * Creates a new directory. * * <p>Relative paths are created relative to {@link #baseDirectory}. If {@link #baseDirectory} * is not set, an IOException is thrown. * * <p>If <code>location</code> already exists as a file, an IOException is thrown. * * @param location Location of directory to create, either absolute or relative. * @return The file handle of the created directory. */ public File createDirectory(String location) throws IOException { Resource directory = get(Paths.convert(location)); return Resources.createNewDirectory(directory); }
/** * Creates a new directory specifying components of the location, and the containing directory. * * <p>Calls through to {@link #createDirectory(String)} * * @param parentFile The containing directory, possibly null. * @param location The components of the path that make up the location of the directory to * create * @return newly created directory */ public File createDirectory(File parentFile, String... location) throws IOException { Resource directory = get(Paths.convert(getBaseDirectory(), parentFile, location)); return Resources.createNewDirectory(directory); }
/** * Creates a new directory, optionally specifying a containing directory. * * <p>Relative paths are created relative to {@link #baseDirectory}. If {@link #baseDirectory} * is not set, an IOException is thrown. * * <p>If <code>location</code> already exists as a file, an IOException is thrown. * * @param parentFile The containing directory, may be null. * @param location Location of directory to create, either absolute or relative. * @return The file handle of the created directory. */ public File createDirectory(File parentFile, String location) throws IOException { Resource directory = get(Paths.convert(getBaseDirectory(), parentFile, location)); return Resources.createNewDirectory(directory); }