File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
io.sloeber.core/src/io/sloeber/core/api Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1111import java .nio .file .Path ;
1212import java .nio .file .Paths ;
1313import java .util .Comparator ;
14+ import java .util .stream .Stream ;
1415
1516import org .eclipse .cdt .core .model .CoreModel ;
1617import org .eclipse .cdt .core .settings .model .ICConfigurationDescription ;
@@ -250,7 +251,9 @@ public static void deleteDirectory(org.eclipse.core.runtime.IPath directory) thr
250251 }
251252
252253 public static void deleteDirectory (Path directory ) throws IOException {
253- Files .walk (directory ).sorted (Comparator .reverseOrder ()).map (Path ::toFile ).forEach (File ::delete );
254+ try ( Stream <Path > stream = Files .walk (directory )){
255+ stream .sorted (Comparator .reverseOrder ()).map (Path ::toFile ).forEach (File ::delete );
256+ }
254257 }
255258
256259 /**
You can’t perform that action at this time.
0 commit comments