commit 19/05/2025

This commit is contained in:
2025-05-20 09:41:36 +07:00
parent 2dfd149990
commit 5f2093a572
10 changed files with 56 additions and 78 deletions

View File

@@ -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);