//
// Pauthor - An authoring library for Pivot collections
// http://pauthor.codeplex.com
//
// This source code is released under the Microsoft Code Sharing License.
// For full details, see: http://pauthor.codeplex.com/license
//
using System;
using System.IO;
using System.Net;
namespace Microsoft.LiveLabs.Pauthor.Crawling
{
publicstaticclass UriUtility
{
publicstatic String ExpandUri(String path)
{
Uri uri = new Uri(path, UriKind.RelativeOrAbsolute);
if (uri.IsAbsoluteUri)
{
if (uri.IsFile) return uri.LocalPath;
return uri.AbsoluteUri;
}
if (File.Exists(path) || Directory.Exists(path)) return Path.GetFullPath(path);
return path;
}
}
}