123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.IO;
- namespace Update.Util
- {
-
-
-
- public static class FilePathUtil
- {
-
- private static readonly string m_BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
-
-
-
-
-
- public static string GetDirectoryName(string absolutePath)
- {
- return Path.GetDirectoryName(absolutePath);
- }
-
-
-
-
-
- public static string GetAbsolutePath(string relativePath)
- {
- return GetAbsolutePath(relativePath, m_BaseDirectory);
- }
-
-
-
-
-
-
- public static string GetAbsolutePath(string relativePath, string basePath)
- {
- return Path.Combine(basePath, relativePath).Replace('/', '\\');
- }
- }
- }
|