2012-07-28 00:13:06 +06:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.IO
|
|
|
|
|
|
{
|
2012-09-29 11:11:48 +07:00
|
|
|
|
public class SystemFiles
|
2012-07-28 00:13:06 +06:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public static string AccessXml
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Data + "/access.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string CreateUiXml
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Umbraco + "/config/create/UI.xml";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string TinyMceConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/tinyMceConfig.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string MetablogConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/metablogConfig.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string DashboardConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/dashboard.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string XsltextensionsConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/xsltextensions.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string RestextensionsConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/restextensions.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string SkinningXml
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Data + "/skinning.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string NotFoundhandlersConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return SystemDirectories.Config + "/404handlers.config";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string FeedProxyConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Concat(SystemDirectories.Config, "/feedProxy.config");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string ContentCacheXml
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2012-09-29 11:11:48 +07:00
|
|
|
|
if (ContentCacheXmlIsEphemeral && SystemUtilities.GetCurrentTrustLevel() == AspNetHostingPermissionLevel.Unrestricted)
|
2012-07-28 00:13:06 +06:00
|
|
|
|
{
|
|
|
|
|
|
return Path.Combine(HttpRuntime.CodegenDir, @"UmbracoData\umbraco.config");
|
|
|
|
|
|
}
|
|
|
|
|
|
return IOHelper.ReturnPath("umbracoContentXML", "~/App_Data/umbraco.config");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2012-09-29 11:11:48 +07:00
|
|
|
|
internal static bool ContentCacheXmlIsEphemeral
|
2012-07-28 00:13:06 +06:00
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
bool returnValue = false;
|
|
|
|
|
|
string configSetting = ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"];
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(configSetting))
|
|
|
|
|
|
if(bool.TryParse(configSetting, out returnValue))
|
|
|
|
|
|
return returnValue;
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|