-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPathUtility.cs
34 lines (33 loc) · 1.15 KB
/
PathUtility.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*************************************************************************************************
*
* THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
*************************************************************************************************/
#if DEBUG
using System.Diagnostics;
#endif
using System.Web;
namespace Figaro.Web
{
/// <summary>
/// Used to resolve the file paths containing server paths.
/// </summary>
internal class PathUtility
{
/// <summary>
/// Resolve paths possibly containing environment variables.
/// </summary>
/// <param name="path">The directory path to resolve.</param>
/// <returns>A resolved path.</returns>
public static string ResolvePath(string path)
{
#if DEBUG
Debug.WriteLine(string.Format("resolving '{0}' to '{1}'... ",path,VirtualPathUtility.GetDirectory(path)),"Configuration");
#endif
return VirtualPathUtility.GetDirectory(path);
}
}
}