public static Path createTempDirectory(final String prefix, final FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException { return createTempDirectory(TEMP_PATH, prefix, attrs); }
public static Path createTempDirectory(final String prefix, final FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException { return createTempDirectory(TEMP_PATH, prefix, attrs); }
@Override public Path createTempDirectory(final Path dir, final String prefix, final FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException { return Files.createTempDirectory(dir, prefix, attrs); }
@Override public Path createTempDirectory(final String prefix, final FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException { return Files.createTempDirectory(prefix, attrs); }
public static Path createTempDirectory(final String prefix, final FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException { return createTempDirectory(TEMP_PATH, prefix, attrs); }
protected Path newTempDir(final Path parent) { final Path dir; if (parent == null) { dir = Files.createTempDirectory("temp"); } else { dir = Files.createTempDirectory(parent, "temp"); } cleanupList.add(dir.toFile()); return dir; }
@Test public void createTempDirectoryNull() { assertThatThrownBy(() -> Files.createTempDirectory((Path) null, null)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Parameter named 'dir' should be not null!"); }
@Test public void createTempDirectoryNoSuchFile() { assertThatThrownBy(() -> Files.createTempDirectory(Paths.get("/path/to/"), null)) .isInstanceOf(NoSuchFileException.class); }
@Before public void setUp() throws Exception { tmpRoot = Files.createTempDirectory("repo"); tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", "target/test-classes/dummy_empty_deps"); }
@Before public void setUp() throws Exception { tmpRoot = Files.createTempDirectory("repo"); tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", "target/test-classes/dummy_empty_deps"); }
@Before public void setUp() throws Exception { editor = new PomEditorDefault(); tmpRoot = Files.createTempDirectory("repo"); tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", "target/test-classes/dummy"); }
public BaseCompilerTest(String prjName) { try { mavenRepoPath = TestUtilMaven.getMavenRepo(); tmpRoot = Files.createTempDirectory("repo"); alternateSettingsAbsPath = new File("src/test/settings.xml").getAbsolutePath(); Path tmp = Files.createDirectories(Paths.get(tmpRoot.toString(), "dummy")); TestUtil.copyTree(Paths.get(prjName), tmp); info = new WorkspaceCompilationInfo(Paths.get(tmp.toUri())); } catch (Exception e) { logger.error(e.getMessage()); } }
@Before public void setUp() throws Exception { editor = new PomEditorDefault(); tmpRoot = Files.createTempDirectory("repo"); tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", "target/test-classes/dummy"); }
@Test public void createTempDirectory() { final Path tempFile = Files.createTempDirectory(null); assertThat(tempFile).isNotNull(); assertThat(tempFile.toFile()).exists(); assertThat(tempFile.toFile()).isDirectory(); final Path tempFile2 = Files.createTempDirectory(""); assertThat(tempFile2).isNotNull(); assertThat(tempFile2.toFile()).exists(); assertThat(tempFile2.toFile()).isDirectory(); final Path tempFile3 = Files.createTempDirectory("foo"); assertThat(tempFile3).isNotNull(); assertThat(tempFile3.toFile()).exists(); assertThat(tempFile3.getFileName().toString()).startsWith("foo"); assertThat(tempFile3.toFile()).isDirectory(); }
@Test public void createTempDirectoryInsideDir() { final Path dir = newTempDir(); assertThat(dir.toFile().list()).isEmpty(); final Path tempFile = Files.createTempDirectory(dir, null); assertThat(tempFile).isNotNull(); assertThat(tempFile.toFile()).exists(); assertThat(tempFile.toFile()).isDirectory(); assertThat(dir.toFile().list()).isNotEmpty(); }
ioService.endBatch(); Path tmpCloned = Files.createTempDirectory("cloned"); final File gitClonedFolder = new File(tmpCloned.toFile(), ".clone.git");