From 0a94a9f7d112a32718208b22546c02ecfc64fee4 Mon Sep 17 00:00:00 2001 From: gewuyou <1063891901@qq.com> Date: Tue, 10 Oct 2023 14:52:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A9=20=E5=AE=8C=E5=96=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=9B=BE=E6=A0=87=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/org/jcnc/jnotepad/util/FileUtil.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jcnc/jnotepad/util/FileUtil.java b/src/main/java/org/jcnc/jnotepad/util/FileUtil.java index 9bd1409..f17542f 100644 --- a/src/main/java/org/jcnc/jnotepad/util/FileUtil.java +++ b/src/main/java/org/jcnc/jnotepad/util/FileUtil.java @@ -148,7 +148,11 @@ public class FileUtil { return null; } - DirFileModel dirFileModel = new DirFileModel(file.getAbsolutePath(), file.getName(), new ArrayList<>(), new FontIcon(FOLDER), new FontIcon(FOLDER_OPEN)); + DirFileModel dirFileModel = new DirFileModel( + file.getAbsolutePath(), + file.getName(), new ArrayList<>(), + new FontIcon(FOLDER), + new FontIcon(FOLDER_OPEN)); File[] files = file.listFiles(); if (files != null) { @@ -158,7 +162,10 @@ public class FileUtil { dirFileModel.getChildFile().add(childDirFileModel); } else { // todo 在此监测文件后缀,设置对应的图标 - dirFileModel.getChildFile().add(new DirFileModel(f.getAbsolutePath(), f.getName(), null, getIconCorrespondingToFileName(f.getName()), getIconCorrespondingToFileName(f.getName()))); + dirFileModel.getChildFile().add(new DirFileModel( + f.getAbsolutePath(), f.getName(), null, + getIconCorrespondingToFileName(f.getName()), + getIconCorrespondingToFileName(f.getName()))); } } }