// Methods public FileSystemContentProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag) : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag) { this.ProcessPaths(base.ViewPaths); this.ProcessPaths(base.UploadPaths); this.ProcessPaths(base.DeletePaths); base.SelectedUrl = FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(base.SelectedUrl)); }
public override Stream GetFile(string url) { string path = base.Context.Server.MapPath(FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(url))); if (!File.Exists(path)) { return(null); } return(File.OpenRead(path)); }
public override string GetPath(string url) { return(VirtualPathUtility.AppendTrailingSlash(VirtualPathUtility.AppendTrailingSlash(VirtualPathUtility.GetDirectory(FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(url))).Replace(@"\", "/")))); }
public override string GetFileName(string url) { return(Path.GetFileName(FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(url)))); }