Exemple #1
0
 // 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));
 }
Exemple #2
0
        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));
        }
Exemple #3
0
 public override string GetPath(string url)
 {
     return(VirtualPathUtility.AppendTrailingSlash(VirtualPathUtility.AppendTrailingSlash(VirtualPathUtility.GetDirectory(FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(url))).Replace(@"\", "/"))));
 }
Exemple #4
0
 public override string GetFileName(string url)
 {
     return(Path.GetFileName(FileBrowserContentProvider.RemoveProtocolNameAndServerName(this.GetAbsolutePath(url))));
 }