REMOVE deleteFile in DirectoryService and replace with local methods

This commit is contained in:
2025-12-07 01:14:08 +00:00
parent 08ef00c22e
commit 739d215c27
3 changed files with 14 additions and 28 deletions

View File

@@ -110,22 +110,6 @@ public class DirectoryService {
}
}
public boolean deleteFile(File file) {
if (file == null || !file.exists()) {
logger.warn("File does not exist: {}", file);
return false;
}
try {
Files.delete(file.toPath());
logger.debug("Deleted file: {}", file.getAbsolutePath());
return true;
} catch (IOException e) {
logger.error("Error deleting file: {}", e.getMessage());
return false;
}
}
public String getFileExtension(String filePath) {
Path path = Paths.get(filePath);
String fileName = path.getFileName().toString();