public override IFileSystem GetFileSystem(IFileSystemPermission permission)
        {
            siteSettings = CacheHelper.GetCurrentSiteSettings();
            //IFileSystemPermission p = GetFileSystemPermission();
            if (permission == null) { return null; }
            if (string.IsNullOrEmpty(permission.VirtualRoot)) { return null; }

            return DiskFileSystem.GetFileSystem(permission);
        }
예제 #2
0
        public override IFileSystem GetFileSystem(IFileSystemPermission permission)
        {
            siteSettings = CacheHelper.GetCurrentSiteSettings();
            //IFileSystemPermission p = GetFileSystemPermission();
            if (permission == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(permission.VirtualRoot))
            {
                return(null);
            }

            return(DiskFileSystem.GetFileSystem(permission));
        }
예제 #3
0
        public static DiskFileSystem GetFileSystem(IFileSystemPermission permission)
        {
            if (permission == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(permission.VirtualRoot))
            {
                return(null);
            }

            DiskFileSystem fs = new DiskFileSystem(permission);

            return(fs);
        }
        public override IFileSystem GetFileSystem(char displayPathSeparator)
        {
            IFileSystemPermission p = GetFileSystemPermission();

            if (p == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(p.RootFolder))
            {
                return(null);
            }

            return(DiskFileSystem.GetFileSystem(p, displayPathSeparator));
        }
예제 #5
0
        public static DiskFileSystem GetFileSystem(IFileSystemPermission permission, char displayPathSeparator)
        {
            if (permission == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(permission.RootFolder))
            {
                return(null);
            }

            DiskFileSystem fs = new DiskFileSystem(permission, displayPathSeparator);

            return(fs);
        }
예제 #6
0
        private DiskFileSystem(IFileSystemPermission permission)
        {
            this.permission = permission;
            fileBaseUrl     = WebUtils.GetApplicationRoot();

            if (permission.VirtualRoot.Contains("userfiles"))
            {
                string userFolder = permission.VirtualRoot.Substring(0, permission.VirtualRoot.LastIndexOf("userfiles")) + "userfiles/";

                if (!FolderExists(userFolder))
                {
                    CreateFolder(userFolder);
                }
            }

            if (!FolderExists(permission.VirtualRoot))
            {
                CreateFolder(permission.VirtualRoot);
            }
        }
예제 #7
0
        private DiskFileSystem(IFileSystemPermission permission)
        {
            this.permission = permission;
            fileBaseUrl = WebUtils.GetApplicationRoot();

            if (permission.VirtualRoot.Contains("userfiles"))
            {
                string userFolder = permission.VirtualRoot.Substring(0, permission.VirtualRoot.LastIndexOf("userfiles")) + "userfiles/";

                if (!FolderExists(userFolder))
                {
                    CreateFolder(userFolder);
                }
            }

            if (!FolderExists(permission.VirtualRoot))
            {
                CreateFolder(permission.VirtualRoot);
            }
        }
예제 #8
0
        public override IFileSystem GetFileSystem(int siteId)
        {
            var siteSettings = new SiteSettings(siteId);

            if (siteSettings == null)
            {
                log.Error($"Site Settings is NULL!!!! Passed SiteId={siteId} from ");
            }
            IFileSystemPermission p = GetFileSystemPermission();

            if (p == null)
            {
                return(null);
            }

            if (string.IsNullOrEmpty(p.VirtualRoot))
            {
                return(null);
            }

            return(DiskFileSystem.GetFileSystem(p));
        }
예제 #9
0
 public abstract IFileSystem GetFileSystem(IFileSystemPermission permission);
예제 #10
0
 public abstract IFileSystem GetFileSystem(IFileSystemPermission permission);
예제 #11
0
 private DiskFileSystem(IFileSystemPermission permission, char displayPathSeparator)
 {
     this.permission           = permission;
     this.displayPathSeparator = displayPathSeparator;
 }
예제 #12
0
        public static DiskFileSystem GetFileSystem(IFileSystemPermission permission)
        {
            if (permission == null) { return null; }
            if(string.IsNullOrEmpty(permission.VirtualRoot)) { return null; }

            DiskFileSystem fs = new DiskFileSystem(permission);
            return fs;
        }