!1267 新增:获取工作目录路径

Merge pull request !1267 from Toint/cherry-pick-1727201282
This commit is contained in:
Looly 2024-09-25 09:35:38 +00:00 committed by Gitee
commit cd1dc20f6d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -196,4 +196,13 @@ public class SystemUtil {
public static String getTmpDirPath() { public static String getTmpDirPath() {
return get("java.io.tmpdir"); return get("java.io.tmpdir");
} }
/**
* 获取工作目录路径绝对路径
*
* @return 工作目录路径
*/
public static String getUserDirPath() {
return get("user.dir");
}
} }