コード例 #1
0
            public void Move(string source, string destination)
            {
                var physicalSource      = WebFileSystem.GetPhysicalPath(source);
                var physicalDestination = WebFileSystem.GetPhysicalPath(destination);

                LocalFileSystem.Instance.File.Move(physicalSource, physicalDestination);
            }
コード例 #2
0
            public Task CopyAsync(string source, string destination, bool overwrite)
            {
                var physicalSource      = WebFileSystem.GetPhysicalPath(source);
                var physicalDestination = WebFileSystem.GetPhysicalPath(destination);

                return(LocalFileSystem.Instance.File.CopyAsync(physicalSource, physicalDestination, overwrite));
            }
コード例 #3
0
            public Task MoveAsync(string source, string destination)
            {
                var physicalSource      = WebFileSystem.GetPhysicalPath(source);
                var physicalDestination = WebFileSystem.GetPhysicalPath(destination);

                return(LocalFileSystem.Instance.File.MoveAsync(physicalSource, physicalDestination));
            }
コード例 #4
0
            public void Copy(string source, string destination, bool overwrite)
            {
                var physicalSource      = WebFileSystem.GetPhysicalPath(source);
                var physicalDestination = WebFileSystem.GetPhysicalPath(destination);

                LocalFileSystem.Instance.File.Copy(physicalSource, physicalDestination, overwrite);
            }
コード例 #5
0
            private string EnsureDirecotry(string virtualPath, System.IO.FileMode mode)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                if (mode != System.IO.FileMode.Open)
                {
                    var directory = System.IO.Path.GetDirectoryName(physicalPath);

                    if (!System.IO.Directory.Exists(directory))
                    {
                        System.IO.Directory.CreateDirectory(directory);
                    }
                }

                return(physicalPath);
            }
コード例 #6
0
            public Task <bool> CreateAsync(string virtualPath, IDictionary <string, object> properties = null)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.CreateAsync(physicalPath, properties));
            }
コード例 #7
0
            public Task <bool> SetInfoAsync(string virtualPath, IDictionary <string, object> properties)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.SetInfoAsync(physicalPath, properties));
            }
コード例 #8
0
            public System.IO.Stream Open(string virtualPath, IDictionary <string, object> properties = null)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.Open(physicalPath, properties));
            }
コード例 #9
0
            public FileInfo GetInfo(string virtualPath)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.GetInfo(physicalPath));
            }
コード例 #10
0
            public Task <FileInfo> GetInfoAsync(string virtualPath)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.GetInfoAsync(physicalPath));
            }
コード例 #11
0
            public bool SetInfo(string virtualPath, IDictionary <string, object> properties)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.SetInfo(physicalPath, properties));
            }
コード例 #12
0
            public Task <bool> DeleteAsync(string virtualPath, bool recursive)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.DeleteAsync(physicalPath, recursive));
            }
コード例 #13
0
            public IEnumerable <DirectoryInfo> GetDirectories(string virtualPath, string pattern, bool recursive = false)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.GetDirectories(physicalPath, pattern, recursive));
            }
コード例 #14
0
            public bool Delete(string virtualPath, bool recursive = false)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.Delete(physicalPath, recursive));
            }
コード例 #15
0
            public Task <bool> ExistsAsync(string virtualPath)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.ExistsAsync(physicalPath));
            }
コード例 #16
0
            public bool Exists(string virtualPath)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.File.Exists(physicalPath));
            }
コード例 #17
0
            public Task <IEnumerable <FileInfo> > GetFilesAsync(string virtualPath, string pattern, bool recursive = false)
            {
                var physicalPath = WebFileSystem.GetPhysicalPath(virtualPath);

                return(LocalFileSystem.Instance.Directory.GetFilesAsync(physicalPath, pattern, recursive));
            }