PathUtils.RemoveLastPart

This commit is contained in:
龙腾猫跃 committed 2026-05-08 21:27:04 +08:00
1 parent 256db1e973
commit 4f1664459d
7 files changed
+54 -26

No files matched your search

+1 -2
View File
@@ -5,8 +5,7 @@ public static class DirectoryUtils {
/// 创建文件夹,或文件所在的文件夹。
/// 文件夹已存在时不会抛出异常。
/// </summary>
public static void Create(string path, bool isFilePath = false) {
if (isFilePath) path = PathUtils.RemoveFileName(path);
public static void Create(string path) {
if (DirectoryUtils.Exists(path)) return;
Logger.Trace($"新建文件夹:{path}");
path = PathUtils.WithLongPath(path);