Skip to content

Commit 2d53b40

Browse files
committed
💾 Feat(StringExt): Added GetFullPath function.
1 parent c4dbc56 commit 2d53b40

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Common.BasicHelper/Utils/Extensions/StringHelper.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,11 @@ public static void Throw<T>(this string? message) where T : Exception
116116
var exp = Activator.CreateInstance(typeof(T), message);
117117
throw (exp as T) ?? new Exception(message);
118118
}
119+
120+
/// <summary>
121+
/// 获取给定路径的完整路径
122+
/// </summary>
123+
/// <param name="path">路径</param>
124+
/// <returns>完整路径</returns>
125+
public static string GetFullPath(this string path) => Path.GetFullPath(path);
119126
}

0 commit comments

Comments
 (0)