From 9f9e16bc9b4caecf741339a0699d784558fbc738 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 21 十一月 2023 19:15:31 +0800
Subject: [PATCH] 2023年11月21日19:15:18

---
 app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
index fb26833..10569f4 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
@@ -79,17 +79,44 @@
     }
 
     /**
+     * 鑾峰彇瀛樻斁銆愰┍鍔ㄦ枃浠跺す銆戞牴璺緞
+     */
+    public String getDriveRootPath() {
+        return getAPPInternalStoreFilesPath() + "/upgrade/drive";
+    }
+
+
+    /**
+     * 鑾峰彇瀛樻斁銆愬浐浠舵枃浠跺す銆戞牴璺緞
+     */
+    public String getFirmwareRootPath() {
+        return getAPPInternalStoreFilesPath() + "/upgrade/firmware";
+    }
+
+    /**
      * 鑾峰彇銆愭棩蹇楁枃浠躲�戝叏璺緞
      */
     public String getLogFilePath() {
-        return getCurrentHomeRootPath() + "/Log.txt";
+        return getCurrentHomeRootPath() + "/log.txt";
     }
 
     /**
      * 鑾峰彇銆愮敤鎴锋枃浠躲�戝叏璺緞
      */
     public String getUserFilePath() {
-        return getAPPInternalStoreFilesPath() + "/UserConfigManage.txt";
+        return getAPPInternalStoreFilesPath() + "/userConfigManage.txt";
+    }
+
+    /**
+     * 鑾峰彇椹卞姩鍗囩骇鏂囦欢鍏ㄨ矾寰�
+     *
+     * @param driverCode 椹卞姩缂栫爜
+     * @param version    椹卞姩鐗堟湰
+     * @return 鍏ㄨ矾寰�
+     */
+    public String getDrivePathFileName(String driverCode, String version) {
+        String driverFileName = driverCode + "_" + version  + ".zip";
+        return HdlFileLogic.getInstance().getDriveRootPath() + "/" + driverFileName;
     }
 
     //endregion
@@ -102,6 +129,11 @@
     public void createDirectory() {
         //瀛樻斁浣忓畢淇℃伅
         this.createFileDir(this.getCurrentHomeRootPath());
+        //椹卞姩鏂囦欢
+        this.createFileDir(this.getDriveRootPath());
+        //鍥轰欢鏂囦欢
+        this.createFileDir(this.getFirmwareRootPath());
+
     }
 
     /**

--
Gitblit v1.8.0