@Test void createFolder() { Path path = Paths.get(rootProjectDir.getRoot().toPath().toString(), "test"); DocumentFileUtils.INSTANCE.createFolder(path); assertTrue(path.toFile().exists()); assertTrue(path.toFile().isDirectory()); }
public synchronized void createFolder(Path folderPath) { if (!folderPath.toFile().exists()) { try { Files.createDirectory(folderPath); } catch (IOException e) { throw new DocumentFileUtilsException("Exception creating folder: " + folderPath, e); } } else if (!folderPath.toFile().isDirectory()) { throw new DocumentFileUtilsException("Wanted to create folder but found a file: " + folderPath); } }
DocumentFileUtils { public synchronized void createFolder(Path folderPath) { if (!folderPath.toFile().exists()) { try { Files.createDirectory(folderPath); } catch (IOException e) { throw new DocumentFileUtilsException("Exception creating folder: " + folderPath, e); } } else if (!folderPath.toFile().isDirectory()) { throw new DocumentFileUtilsException("Wanted to create folder but found a file: " + folderPath); } } }
DocumentFileUtils { public synchronized void createFolder(Path folderPath) { if (!folderPath.toFile().exists()) { try { Files.createDirectory(folderPath); } catch (IOException e) { throw new DocumentFileUtilsException("Exception creating folder: " + folderPath, e); } } else if (!folderPath.toFile().isDirectory()) { throw new DocumentFileUtilsException("Wanted to create folder but found a file: " + folderPath); } } private  DocumentFileUtils(DocumentTools documentTools); }
DocumentFileUtils { public synchronized void createFolder(Path folderPath) { if (!folderPath.toFile().exists()) { try { Files.createDirectory(folderPath); } catch (IOException e) { throw new DocumentFileUtilsException("Exception creating folder: " + folderPath, e); } } else if (!folderPath.toFile().isDirectory()) { throw new DocumentFileUtilsException("Wanted to create folder but found a file: " + folderPath); } } private  DocumentFileUtils(DocumentTools documentTools); void createFile(Element element, Path path); void createFile(Element element, Path path, boolean addNamespace); synchronized void createFolder(Path folderPath); synchronized void createFolders(Path folderPath); }
DocumentFileUtils { public synchronized void createFolder(Path folderPath) { if (!folderPath.toFile().exists()) { try { Files.createDirectory(folderPath); } catch (IOException e) { throw new DocumentFileUtilsException("Exception creating folder: " + folderPath, e); } } else if (!folderPath.toFile().isDirectory()) { throw new DocumentFileUtilsException("Wanted to create folder but found a file: " + folderPath); } } private  DocumentFileUtils(DocumentTools documentTools); void createFile(Element element, Path path); void createFile(Element element, Path path, boolean addNamespace); synchronized void createFolder(Path folderPath); synchronized void createFolders(Path folderPath); static final DocumentFileUtils INSTANCE; static final String BUNDLE_EXTENSION; static final String DELETE_BUNDLE_EXTENSION; static final String INSTALL_BUNDLE_EXTENSION; static final String PREFIX_ENVIRONMENT; static final String PREFIX_FULL; }