public static string GetBundlesPath(IRequestHandler requestHandler) { if (string.IsNullOrEmpty(PathManager.bundlesPath)) { PathManager.bundlesPath = PathManager.Combine(PathManager.GetContentRootPath(requestHandler), "Bundles"); } PathManager.EnsurePathExists(PathManager.bundlesPath); return(PathManager.bundlesPath); }
public static string GetViewsPath(IRequestHandler requestHandler, string subdirectory) { if (string.IsNullOrEmpty(PathManager.viewsPath)) { PathManager.viewsPath = PathManager.Combine(PathManager.GetContentRootPath(requestHandler), "Views"); } if (string.IsNullOrEmpty(subdirectory)) { PathManager.EnsurePathExists(PathManager.viewsPath); return(PathManager.viewsPath); } string viewsPath = PathManager.Combine(PathManager.viewsPath, subdirectory); PathManager.EnsurePathExists(viewsPath); return(viewsPath); }
public static void EnsureFilepathExists(string filepath) { PathManager.EnsurePathExists(filepath.Remove(filepath.LastIndexOf(Path.DirectorySeparatorChar))); }