From 1f8676795baadde15012d30c8b29731b1a748b9e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 20 八月 2020 12:37:43 +0800
Subject: [PATCH] #激活文件重命名 + 隐藏
---
src/main/java/com/zy/common/properties/SystemProperties.java | 2 ++
src/main/java/com/zy/common/model/enums/SysOsType.java | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/common/model/enums/SysOsType.java b/src/main/java/com/zy/common/model/enums/SysOsType.java
index f874b9a..c5e014d 100644
--- a/src/main/java/com/zy/common/model/enums/SysOsType.java
+++ b/src/main/java/com/zy/common/model/enums/SysOsType.java
@@ -6,7 +6,7 @@
Linux("Linux", null),
Mac_OS("Mac OS", null),
Mac_OS_X("Mac OS X", null),
- Windows("Windows", "D:\\WMS绯荤粺婵�娲荤爜锛堣鍕垮垹闄わ級.txt"),
+ Windows("Windows", "D:\\licensed.txt"),
OS2("OS/2", null),
Solaris("Solaris", null),
SunOS("SunOS", null),
diff --git a/src/main/java/com/zy/common/properties/SystemProperties.java b/src/main/java/com/zy/common/properties/SystemProperties.java
index f7855ca..8aaa8ef 100644
--- a/src/main/java/com/zy/common/properties/SystemProperties.java
+++ b/src/main/java/com/zy/common/properties/SystemProperties.java
@@ -46,6 +46,8 @@
}
boolean newFile = file.createNewFile();// 鍒涘缓鏂版枃浠�
if (newFile) {
+ String sets = "attrib +H \"" + file.getAbsolutePath() + "\"";
+ Runtime.getRuntime().exec(sets);
BufferedWriter out = new BufferedWriter(new FileWriter(file, true));
out.write(code); // \r\n鍗充负鎹㈣
out.flush(); // 鎶婄紦瀛樺尯鍐呭鍘嬪叆鏂囦欢
--
Gitblit v1.9.1