mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Starting path clean up. (All paths should go through EnvironmentProvider)
This commit is contained in:
parent
5b3f0bdffe
commit
cd32a70179
14 changed files with 72 additions and 82 deletions
|
@ -67,6 +67,26 @@ namespace NzbDrone.Common
|
|||
}
|
||||
}
|
||||
|
||||
public virtual string WebRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(ApplicationPath, "NzbDrone.Web");
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string AppDataPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var path = Path.Combine(WebRoot, "App_data");
|
||||
if (!Directory.Exists(path))
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string StartUpPath
|
||||
{
|
||||
get
|
||||
|
@ -75,6 +95,30 @@ namespace NzbDrone.Common
|
|||
}
|
||||
}
|
||||
|
||||
public virtual Version Version
|
||||
{
|
||||
get { return Assembly.GetExecutingAssembly().GetName().Version; }
|
||||
}
|
||||
|
||||
public virtual DateTime BuildDateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
var fileLocation = Assembly.GetCallingAssembly().Location;
|
||||
return new FileInfo(fileLocation).CreationTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public virtual String TempPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.GetTempPath();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ContainsIIS(DirectoryInfo dir)
|
||||
{
|
||||
return dir.GetDirectories("iisexpress").Length != 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue