public override void DeleteDirectory(Directory directory) { if (!directory.Parent.Equals(this)) { throw new ArgumentException("The specified directory could not be found"); } GoogleDriveDirectory googleDriveDirectory = directory as GoogleDriveDirectory; if (storage.UseTrash) { FilesResource.TrashRequest request = storage.Service.Files.Trash(googleDriveDirectory.folder.Id); request.Execute(); } else { FilesResource.DeleteRequest request = storage.Service.Files.Delete(googleDriveDirectory.folder.Id); request.Execute(); } }
public GoogleDriveDirectory(GoogleDriveStorage storage, GoogleDriveDirectory parent, Google.Apis.Drive.v2.Data.File folder) { this.storage = storage; this.parent = parent; this.folder = folder; }
public GoogleDriveFile(GoogleDriveStorage storage, GoogleDriveDirectory parent, Google.Apis.Drive.v2.Data.File file) { this.storage = storage; this.parent = parent; this.file = file; }