@Test public void mkdir() throws IOException { Path createDir = PathUtils.get(root, "/test"); Command.get().mkdir(createDir.toString()); assertThat(exists(createDir), is(true)); }
public void mkdir(String dir) { logCmdJava(format("mkdir %s", dir)); FileUtils.createDirectories(Paths.get(dir)); }
Command { public void mkdir(String dir) { logCmdJava(format("mkdir %s", dir)); FileUtils.createDirectories(Paths.get(dir)); } }
Command { public void mkdir(String dir) { logCmdJava(format("mkdir %s", dir)); FileUtils.createDirectories(Paths.get(dir)); }  }
Command { public void mkdir(String dir) { logCmdJava(format("mkdir %s", dir)); FileUtils.createDirectories(Paths.get(dir)); }  static synchronized final Command get(); abstract String osname(); abstract boolean isLinux(); abstract boolean isWindows(); abstract void serviceStart(String name); abstract void serviceStop(String name); abstract void serviceRestart(String name); abstract String serviceStatus(String name); abstract void startServiceAtSystemBoot(String name); abstract void doNotStartServiceAtSystemBoot(String name); abstract String distribution(); abstract void execute(String file); abstract void addRepository(String repository); abstract void installRemotePack(String pack); abstract void installRemotePack(String pack, String version); abstract void installLocalPack(String path); abstract boolean isInstalled(String pack); abstract void uninstallRemotePack(String pack); abstract void uninstallLocalPack(String pack); abstract void unzip(String from, String toDir); abstract void fixTextContent(String file); abstract void groupadd(final String group); abstract void groupadd(final String group, final String options); abstract void useradd(final String user); abstract void useradd(final String user, final String options); abstract void userdel(final String user); abstract void userdel(final String user, final String options); abstract void passwd(final String user, final String passwd); abstract void chmod(final String mode, final String file); abstract void chmod(final String mode, final String file, boolean recursive); abstract void chown(final String user, final String path); abstract void chown(final String user, final String path, final boolean recursive); abstract void chown(final String user, final String group, final String path); abstract void chown(final String user, final String group, final String path, final boolean recursive); abstract void ln(final String link, final String targetFile); boolean exists(final String file); String whoami(); void mkdir(String dir); void mv(String from, String to); List<String> ls(String path); void rm(String path); void cp(String from, String to); String run(String cmd); String run(List<String> cmdList); String run(String cmd, final boolean prettyPrint); String run(List<String> cmdList, final boolean shouldPrintOutput); String run(String cmd, final int... successfulExec); String run(List<String> cmdList, final int... successfulExec); String run(String cmd, Interaction interact); String run(List<String> cmdList, Interaction interact); String runWithNoInteraction(String cmd); String runWithNoInteraction(List<String> cmdList); String whatIsMyIp(); String whatIsMyHostName(); }
Command { public void mkdir(String dir) { logCmdJava(format("mkdir %s", dir)); FileUtils.createDirectories(Paths.get(dir)); }  static synchronized final Command get(); abstract String osname(); abstract boolean isLinux(); abstract boolean isWindows(); abstract void serviceStart(String name); abstract void serviceStop(String name); abstract void serviceRestart(String name); abstract String serviceStatus(String name); abstract void startServiceAtSystemBoot(String name); abstract void doNotStartServiceAtSystemBoot(String name); abstract String distribution(); abstract void execute(String file); abstract void addRepository(String repository); abstract void installRemotePack(String pack); abstract void installRemotePack(String pack, String version); abstract void installLocalPack(String path); abstract boolean isInstalled(String pack); abstract void uninstallRemotePack(String pack); abstract void uninstallLocalPack(String pack); abstract void unzip(String from, String toDir); abstract void fixTextContent(String file); abstract void groupadd(final String group); abstract void groupadd(final String group, final String options); abstract void useradd(final String user); abstract void useradd(final String user, final String options); abstract void userdel(final String user); abstract void userdel(final String user, final String options); abstract void passwd(final String user, final String passwd); abstract void chmod(final String mode, final String file); abstract void chmod(final String mode, final String file, boolean recursive); abstract void chown(final String user, final String path); abstract void chown(final String user, final String path, final boolean recursive); abstract void chown(final String user, final String group, final String path); abstract void chown(final String user, final String group, final String path, final boolean recursive); abstract void ln(final String link, final String targetFile); boolean exists(final String file); String whoami(); void mkdir(String dir); void mv(String from, String to); List<String> ls(String path); void rm(String path); void cp(String from, String to); String run(String cmd); String run(List<String> cmdList); String run(String cmd, final boolean prettyPrint); String run(List<String> cmdList, final boolean shouldPrintOutput); String run(String cmd, final int... successfulExec); String run(List<String> cmdList, final int... successfulExec); String run(String cmd, Interaction interact); String run(List<String> cmdList, Interaction interact); String runWithNoInteraction(String cmd); String runWithNoInteraction(List<String> cmdList); String whatIsMyIp(); String whatIsMyHostName(); static Command INSTANCE; }