예제 #1
0
        protected static IEnumerable<Directory> GetSubDirectories(Directory directory, string[] exclusions = null)
        {
            foreach (Directory subDirectory in directory.Directories)
            {
                if (exclusions != null && exclusions.Any(e => MatchPattern(subDirectory.Path + "/", e)))
                    continue;

                yield return subDirectory;

                foreach (Directory subSubDirectory in GetSubDirectories(subDirectory, exclusions))
                    yield return subSubDirectory;
            }
        }
예제 #2
0
        public override void DeleteDirectory(Directory directory)
        {
            if (!directory.Parent.Equals(this))
                throw new ArgumentException("The specified directory could not be found");

            string path = this.directory.FullName + "/" + directory.Name;
            storage.SftpClient.DeleteDirectory(path);
        }
예제 #3
0
        public SftpCachedDirectory(SftpStorage storage, Directory parent, string path, string name)
        {
            this.storage = storage;
            this.parent = parent;

            this.path = path;
            this.name = name;
            this.directories = new List<SftpCachedDirectory>();
            this.files = new List<SftpCachedFile>();
        }
예제 #4
0
        public override void DeleteDirectory(Directory directory)
        {
            if (!directory.Parent.Equals(this))
                throw new ArgumentException("The specified directory could not be found");

            OneDriveDirectory oneDriveDirectory = directory as OneDriveDirectory;

            Task task = storage.Client.Drive.Items[oneDriveDirectory.directory.Id].Request().DeleteAsync();
            task.Wait();
        }
예제 #5
0
        public override void DeleteDirectory(Directory directory)
        {
            ZipDirectory zipDirectory = directory as ZipDirectory;
            zipDirectory.directory.Delete();

            storage.Modified = true;
        }
예제 #6
0
 public DeleteDirectoryAction(Directory directory)
 {
     Directory = directory;
 }
예제 #7
0
        public override void DeleteDirectory(Directory directory)
        {
            if (!directory.Parent.Equals(this))
                throw new ArgumentException("The specified directory could not be found");

            ZipDirectory zipDirectory = directory as ZipDirectory;
            zipDirectory.directory.Delete();

            storage.Modified = true;
        }
예제 #8
0
 public ZipDirectory(ZipStorage storage, Directory parent, ZipArchiveEntry directory)
 {
     this.storage = storage;
     this.parent = parent;
     this.directory = directory;
 }
예제 #9
0
 public DirectoryDiff(Storage leftStorage, Directory leftDirectory, Storage rightStorage, Directory rightDirectory)
 {
     this.leftStorage = leftStorage;
     this.rightStorage = rightStorage;
     this.leftDirectory = leftDirectory;
     this.rightDirectory = rightDirectory;
 }
예제 #10
0
 public abstract void DeleteDirectory(Directory directory);