Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ public static void removeFileFromRepo(Path repoPath, Path filePath) throws IOExc
* @throws IOException If an I/O error occurs.
*/
public static void deleteRepo(Path directoryPath) throws IOException {
Files.walk(directoryPath)
.sorted(Comparator.reverseOrder())
.map(Path::toFile)
.forEach(File::delete);
try (var stream = Files.walk(directoryPath)) {
stream
.sorted(Comparator.reverseOrder())
.map(Path::toFile)
.forEach(File::delete);
}
}

/**
Expand Down