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; } }
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); }
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>(); }
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(); }
public override void DeleteDirectory(Directory directory) { ZipDirectory zipDirectory = directory as ZipDirectory; zipDirectory.directory.Delete(); storage.Modified = true; }
public DeleteDirectoryAction(Directory directory) { Directory = directory; }
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; }
public ZipDirectory(ZipStorage storage, Directory parent, ZipArchiveEntry directory) { this.storage = storage; this.parent = parent; this.directory = directory; }
public DirectoryDiff(Storage leftStorage, Directory leftDirectory, Storage rightStorage, Directory rightDirectory) { this.leftStorage = leftStorage; this.rightStorage = rightStorage; this.leftDirectory = leftDirectory; this.rightDirectory = rightDirectory; }
public abstract void DeleteDirectory(Directory directory);