mirror of https://gitee.com/stylefeng/roses
【8.3.4】【file】更新一个获取本地文件路径的方法
parent
d569c80095
commit
86e20a8455
|
@ -0,0 +1,30 @@
|
||||||
|
package cn.stylefeng.roses.kernel.file.api.util;
|
||||||
|
|
||||||
|
import cn.hutool.system.SystemUtil;
|
||||||
|
import cn.stylefeng.roses.kernel.file.api.expander.FileConfigExpander;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径获取
|
||||||
|
* <p>
|
||||||
|
* 针对文件存储在本地的情况下的时候,获取本地的文件存储目录用
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2025/4/11 13:54
|
||||||
|
*/
|
||||||
|
public class LocalFilePathUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件当前存储路径
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2025/4/11 13:54
|
||||||
|
*/
|
||||||
|
public static String getCurrentSavePath() {
|
||||||
|
if (SystemUtil.getOsInfo().isWindows()) {
|
||||||
|
return FileConfigExpander.getLocalFileSavePathWindows();
|
||||||
|
} else {
|
||||||
|
return FileConfigExpander.getLocalFileSavePathLinux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue