您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

PathHelper.cs 523 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.IO;
  3. namespace MQTTnet.Server.Configuration
  4. {
  5. public static class PathHelper
  6. {
  7. public static string ExpandPath(string path)
  8. {
  9. if (path == null)
  10. {
  11. return null;
  12. }
  13. var uri = new Uri(path, UriKind.RelativeOrAbsolute);
  14. if (!uri.IsAbsoluteUri)
  15. {
  16. return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
  17. }
  18. return path;
  19. }
  20. }
  21. }