Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public static void EnsureFilepathExists(string filepath)
 {
     PathManager.EnsurePathExists(filepath.Remove(filepath.LastIndexOf(Path.DirectorySeparatorChar)));
 }