Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
910fe626
Commit
910fe626
authored
Apr 16, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增获取不带后缀文件名称方法
parent
0c820b96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
.../src/main/java/com/ruoyi/common/utils/file/FileUtils.java
+9
-7
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
View file @
910fe626
...
@@ -257,8 +257,8 @@ public class FileUtils
...
@@ -257,8 +257,8 @@ public class FileUtils
}
}
/**
/**
* 获取
名称
* 获取
文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png
*
例如: /profile/upload/2022/04/16/ruoyi.png, 返回: ruoyi.png
*
* @param fileName 路径名称
* @param fileName 路径名称
* @return 没有文件路径的名称
* @return 没有文件路径的名称
*/
*/
...
@@ -275,13 +275,15 @@ public class FileUtils
...
@@ -275,13 +275,15 @@ public class FileUtils
}
}
/**
/**
* 获取
名称
* 获取
不带后缀文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi
*
例如: /profile/upload/2022/04/16/ruoyi.png, 返回: ruoyi
*
* @param fileName 路径名称
* @param fileName 路径名称
* @return 没有文件路径的名称
* @return 没有文件路径
和后缀
的名称
*/
*/
public
static
String
getNameNotSuffix
(
String
fileName
)
{
public
static
String
getNameNotSuffix
(
String
fileName
)
if
(
fileName
==
null
)
{
{
if
(
fileName
==
null
)
{
return
null
;
return
null
;
}
}
String
baseName
=
FilenameUtils
.
getBaseName
(
fileName
);
String
baseName
=
FilenameUtils
.
getBaseName
(
fileName
);
...
...
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