using System;
using System.Web;
using umbraco.presentation.LiveEditing;
using umbraco.BasePages;
using umbraco.cms.businesslogic.web;
using System.Xml.Linq;
using umbraco.IO;
namespace umbraco.presentation
{
public class UmbracoServerUtility : HttpServerUtilityWrapper
{
private HttpServerUtility m_Server;
public UmbracoServerUtility(HttpServerUtility server)
: base(server)
{
m_Server = server;
}
///
/// Returns the physical file path that corresponds to the specified virtual path on the Web server.
///
/// The virtual path of the Web server.
///
/// The physical file path that corresponds to .
///
///
/// The current is null.
///
public override string MapPath(string path)
{
return IOHelper.MapPath(path);
}
public string UmbracoPath
{
get
{
return IOHelper.ResolveUrl( SystemDirectories.Umbraco );
}
}
public string ContentXmlPath
{
get
{
return IOHelper.ResolveUrl( SystemFiles.ContentCacheXml );
}
}
///
/// Gets the Umbraco XML cache
///
/// The content XML.
public XDocument ContentXml
{
get
{
return XDocument.Load(this.MapPath(this.ContentXmlPath));
}
}
public string DataFolder
{
get
{
return IOHelper.ResolveUrl( SystemDirectories.Data );
}
}
}
}