Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
1a602ff4
Commit
1a602ff4
authored
Jul 03, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
ec15499a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
FileUtils.java
...on/src/main/java/com/dsk/common/utils/file/FileUtils.java
+3
-3
No files found.
dsk-common/src/main/java/com/dsk/common/utils/file/FileUtils.java
View file @
1a602ff4
...
...
@@ -265,11 +265,11 @@ public class FileUtils
for
(
File
directory
:
files
)
{
// 如果是文件夹则递归调用此方法
if
(
directory
.
isDirectory
())
{
fileList
.
add
(
new
BusinessFileVo
(
directory
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
directory
.
lastModified
())));
fileList
.
add
(
new
BusinessFileVo
(
directory
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
).
format
(
directory
.
lastModified
())));
getAllFiles
(
directory
.
getPath
());
}
else
{
// 如果是文件则直接输出路径
fileList
.
add
(
new
BusinessFileVo
(
directory
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
directory
.
lastModified
())));
fileList
.
add
(
new
BusinessFileVo
(
directory
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
).
format
(
directory
.
lastModified
())));
}
}
return
fileList
;
...
...
@@ -301,7 +301,7 @@ public class FileUtils
tempFile
=
new
File
(
path
+
File
.
separator
+
fileName
);
}
if
(
tempFile
.
isFile
())
{
fileList
.
add
(
new
BusinessFileVo
(
tempFile
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
tempFile
.
lastModified
())));
fileList
.
add
(
new
BusinessFileVo
(
tempFile
.
getPath
(),
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
).
format
(
tempFile
.
lastModified
())));
}
if
(
tempFile
.
isDirectory
())
{
List
<
BusinessFileVo
>
allFiles
=
getAllFileNames
(
tempFile
.
getAbsolutePath
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment