IApplicationPaths.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. namespace MediaBrowser.Common.Configuration
  2. {
  3. /// <summary>
  4. /// Interface IApplicationPaths.
  5. /// </summary>
  6. public interface IApplicationPaths
  7. {
  8. /// <summary>
  9. /// Gets the path to the program data folder.
  10. /// </summary>
  11. /// <value>The program data path.</value>
  12. string ProgramDataPath { get; }
  13. /// <summary>
  14. /// Gets the path to the web UI resources folder.
  15. /// </summary>
  16. /// <remarks>
  17. /// This value is not relevant if the server is configured to not host any static web content.
  18. /// </remarks>
  19. string WebPath { get; }
  20. /// <summary>
  21. /// Gets the path to the program system folder.
  22. /// </summary>
  23. /// <value>The program data path.</value>
  24. string ProgramSystemPath { get; }
  25. /// <summary>
  26. /// Gets the folder path to the data directory.
  27. /// </summary>
  28. /// <value>The data directory.</value>
  29. string DataPath { get; }
  30. /// <summary>
  31. /// Gets the image cache path.
  32. /// </summary>
  33. /// <value>The image cache path.</value>
  34. string ImageCachePath { get; }
  35. /// <summary>
  36. /// Gets the path to the plugin directory.
  37. /// </summary>
  38. /// <value>The plugins path.</value>
  39. string PluginsPath { get; }
  40. /// <summary>
  41. /// Gets the path to the plugin configurations directory.
  42. /// </summary>
  43. /// <value>The plugin configurations path.</value>
  44. string PluginConfigurationsPath { get; }
  45. /// <summary>
  46. /// Gets the path to the log directory.
  47. /// </summary>
  48. /// <value>The log directory path.</value>
  49. string LogDirectoryPath { get; }
  50. /// <summary>
  51. /// Gets the path to the application configuration root directory.
  52. /// </summary>
  53. /// <value>The configuration directory path.</value>
  54. string ConfigurationDirectoryPath { get; }
  55. /// <summary>
  56. /// Gets the path to the system configuration file.
  57. /// </summary>
  58. /// <value>The system configuration file path.</value>
  59. string SystemConfigurationFilePath { get; }
  60. /// <summary>
  61. /// Gets the folder path to the cache directory.
  62. /// </summary>
  63. /// <value>The cache directory.</value>
  64. string CachePath { get; }
  65. /// <summary>
  66. /// Gets the folder path to the temp directory within the cache folder.
  67. /// </summary>
  68. /// <value>The temp directory.</value>
  69. string TempDirectory { get; }
  70. /// <summary>
  71. /// Gets the magic string used for virtual path manipulation.
  72. /// </summary>
  73. /// <value>The magic string used for virtual path manipulation.</value>
  74. string VirtualDataPath { get; }
  75. /// <summary>
  76. /// Gets the path used for storing trickplay files.
  77. /// </summary>
  78. /// <value>The trickplay path.</value>
  79. string TrickplayPath { get; }
  80. /// <summary>
  81. /// Gets the path used for storing backup archives.
  82. /// </summary>
  83. /// <value>The backup path.</value>
  84. string BackupPath { get; }
  85. /// <summary>
  86. /// Checks and creates all known base paths.
  87. /// </summary>
  88. void MakeSanityCheckOrThrow();
  89. /// <summary>
  90. /// Checks and creates the given path and adds it with a marker file if non existant.
  91. /// </summary>
  92. /// <param name="path">The path to check.</param>
  93. /// <param name="markerName">The common marker file name.</param>
  94. /// <param name="recursive">Check for other settings paths recursivly.</param>
  95. void CreateAndCheckMarker(string path, string markerName, bool recursive = false);
  96. }
  97. }