From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation

---
 fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/AppFileUtils.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/AppFileUtils.java b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/AppFileUtils.java
new file mode 100644
index 0000000..79649ea
--- /dev/null
+++ b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/AppFileUtils.java
@@ -0,0 +1,30 @@
+package com.megatim.fdxcommons.tools;
+
+import com.megatim.module.compression.impl.JavaZipZip4Impl;
+import java.io.File;
+import java.nio.file.Paths;
+
+/**
+ *
+ * @author lenovo
+ */
+public class AppFileUtils {
+
+    private AppFileUtils() {
+    }
+
+    public static File unzipFileInDirectory(String source, String destination) throws Exception {
+        File sourceFile = new File(source);
+        File destinationFile = new File(destination);
+
+        String sourceFileName = sourceFile.getName();
+        int lastIndex = sourceFileName.lastIndexOf(".");
+        String unzipFileName = sourceFileName.substring(0, lastIndex);
+
+        JavaZipZip4Impl zip = new JavaZipZip4Impl();
+        zip.unZipFile(sourceFile, destinationFile);
+
+        return Paths.get(destination, unzipFileName).toFile();
+    }
+
+}

--
Gitblit v1.10.0