PathExtensionMethod.cs 449 B

12345678910111213
  1. using System.IO;
  2. namespace VCommon.IO
  3. {
  4. public static class PathExtensionMethod
  5. {
  6. public static string CombinePath(this string me, string to, bool defaultDirectorySeparatorChar = true)
  7. => new[] { me, to }.JoinString(defaultDirectorySeparatorChar ? Path.DirectorySeparatorChar.ToString() : "/");
  8. public static string CombineWebPath(this string me, string to)
  9. => CombinePath(me, to, false);
  10. }
  11. }