Path dir = Testing.Files.createTestingPath("simple/gen-expected").toAbsolutePath(); Testing.Files.delete(dir);
Path dir = Testing.Files.createTestingPath("simple/gen-expected").toAbsolutePath(); Testing.Files.delete(dir);
/** * Create a directory within the test data directory at the given relative path. * * @param relativePath the path of the directory within the test data directory; may not be null * @return the reference to the existing readable and writable directory */ public static File createTestingDirectory(String relativePath) { Path dirPath = createTestingPath(relativePath); return IoUtil.createDirectory(dirPath); }
/** * Create a directory within the test data directory at the given relative path. * * @param relativePath the path of the directory within the test data directory; may not be null * @param removeExistingContent true if any existing content should be removed * @return the reference to the existing readable and writable directory * @throws IOException if there is a problem deleting the files at this path */ public static File createTestingDirectory(String relativePath, boolean removeExistingContent) throws IOException { Path dirPath = createTestingPath(relativePath); return IoUtil.createDirectory(dirPath, removeExistingContent); }
/** * Create a file within the test data directory at the given relative path. * * @param relativePath the path of the file within the test data directory; may not be null * @return the reference to the existing readable and writable file */ public static File createTestingFile(String relativePath) { Path path = createTestingPath(relativePath); return IoUtil.createFile(path); }