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 11
11
import java .nio .file .Path ;
12
12
import java .nio .file .Paths ;
13
13
import java .util .Comparator ;
14
+ import java .util .stream .Stream ;
14
15
15
16
import org .eclipse .cdt .core .model .CoreModel ;
16
17
import org .eclipse .cdt .core .settings .model .ICConfigurationDescription ;
@@ -250,7 +251,9 @@ public static void deleteDirectory(org.eclipse.core.runtime.IPath directory) thr
250
251
}
251
252
252
253
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
+ }
254
257
}
255
258
256
259
/**
You can’t perform that action at this time.
0 commit comments