diff --git a/src/main/java/org/jcnc/jnotepad/app/config/AppConfig.java b/src/main/java/org/jcnc/jnotepad/app/config/AppConfig.java index c2488af..ad46c98 100644 --- a/src/main/java/org/jcnc/jnotepad/app/config/AppConfig.java +++ b/src/main/java/org/jcnc/jnotepad/app/config/AppConfig.java @@ -14,7 +14,12 @@ import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIREC /** * 应用程序配置文件 * + *
+ * 此类用于存储应用程序的配置信息,包括程序根路径、排除的文件夹和文件等。 + *
+ * * @author gewuyou + * */ public class AppConfig { /** @@ -37,6 +42,9 @@ public class AppConfig { @JsonIgnore private String lastRootPath; + /** + * 构造应用程序配置对象 + */ public AppConfig() { ignoreFolder = Set.of( new File(Paths.get(System.getProperty(DEFAULT_PROPERTY), PROGRAM_FILE_DIRECTORY, "system").toString()), @@ -45,26 +53,56 @@ public class AppConfig { ignoreFile = Collections.emptySet(); } + /** + * 获取程序根路径 + * + * @return 程序根路径 + */ public String getRootPath() { return Optional.ofNullable(rootPath).orElse(System.getProperty(DEFAULT_PROPERTY)); } + /** + * 设置程序根路径 + * + * @param rootPath 程序根路径 + */ public void setRootPath(String rootPath) { this.rootPath = rootPath; } + /** + * 获取上次的程序根路径 + * + * @return 上次的程序根路径 + */ public String getLastRootPath() { return lastRootPath; } + /** + * 设置上次的程序根路径 + * + * @param lastRootPath 上次的程序根路径 + */ public void setLastRootPath(String lastRootPath) { this.lastRootPath = lastRootPath; } + /** + * 获取排除的文件夹集合 + * + * @return 排除的文件夹集合 + */ public Set