commit 19/05/2025
This commit is contained in:
@@ -226,10 +226,10 @@ public class SomeCodes {
|
||||
for(int i=0; i<path.length; i++){
|
||||
try{
|
||||
result[i] = Files.deleteIfExists(Path.of(path[i]));
|
||||
if (result[i]) System.out.println("Delete: "+path[i]);
|
||||
if (result[i]) Logger.info("Delete: "+path[i]);
|
||||
} catch (Exception e){
|
||||
result[i] = false;
|
||||
System.out.println("Error deleting file: "+path[i]+", Msg : "+e.getMessage());
|
||||
Logger.error("Error deleting file: "+path[i]+", Msg : "+e.getMessage());
|
||||
}
|
||||
}
|
||||
return Arrays.stream(result).allMatch(x->x);
|
||||
@@ -243,10 +243,10 @@ public class SomeCodes {
|
||||
for(int i=0; i<path.length; i++){
|
||||
try{
|
||||
result[i] = Files.deleteIfExists(path[i]);
|
||||
if (result[i]) System.out.println("Delete: "+path[i]);
|
||||
if (result[i]) Logger.info("Delete: "+path[i]);
|
||||
} catch (Exception e){
|
||||
result[i] = false;
|
||||
System.out.println("Error deleting file: "+path[i]+", Msg : "+e.getMessage());
|
||||
Logger.error("Error deleting file: "+path[i]+", Msg : "+e.getMessage());
|
||||
}
|
||||
}
|
||||
return Arrays.stream(result).allMatch(x->x);
|
||||
|
||||
Reference in New Issue
Block a user