@Test public void testDeleteNoParentPlaceholder() throws Exception { final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); container.attributes().setRegion("IAD"); final String name = "placeholder-" + UUID.randomUUID().toString(); final Path placeholder = new Path( new Path(container, "t", EnumSet.of(Path.Type.directory)), name, EnumSet.of(Path.Type.directory)); final Path test = new Path(placeholder, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)); new SwiftTouchFeature(session, new SwiftRegionService(session)).touch(test, new TransferStatus()); final SwiftFindFeature find = new SwiftFindFeature(session); assertFalse(find.find(placeholder)); final SwiftObjectListService list = new SwiftObjectListService(session); final AttributedList<Path> children = list.list(placeholder.getParent(), new DisabledListProgressListener()); assertTrue(children.contains(new Path( new Path(container, "t", EnumSet.of(Path.Type.directory)), name, EnumSet.of(Path.Type.directory, Path.Type.placeholder)))); assertTrue(children.contains(placeholder)); assertFalse(children.contains(test)); assertTrue(list.list(placeholder, new DisabledListProgressListener()).contains(test)); assertTrue(find.find(test)); new SwiftDeleteFeature(session).delete(Arrays.asList(placeholder, test), new DisabledLoginCallback(), new Delete.DisabledCallback()); assertFalse(find.find(test)); assertFalse(find.find(placeholder)); }
@Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { this.delete(files, prompt, callback, true); }
SwiftDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { this.delete(files, prompt, callback, true); } }
SwiftDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { this.delete(files, prompt, callback, true); } SwiftDeleteFeature(final SwiftSession session);  SwiftDeleteFeature(final SwiftSession session, final SwiftRegionService regionService);  SwiftDeleteFeature(final SwiftSession session, final SwiftSegmentService segmentService,
                              final SwiftRegionService regionService); }
SwiftDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { this.delete(files, prompt, callback, true); } SwiftDeleteFeature(final SwiftSession session);  SwiftDeleteFeature(final SwiftSession session, final SwiftRegionService regionService);  SwiftDeleteFeature(final SwiftSession session, final SwiftSegmentService segmentService,
                              final SwiftRegionService regionService); @Override void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback); }
SwiftDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { this.delete(files, prompt, callback, true); } SwiftDeleteFeature(final SwiftSession session);  SwiftDeleteFeature(final SwiftSession session, final SwiftRegionService regionService);  SwiftDeleteFeature(final SwiftSession session, final SwiftSegmentService segmentService,
                              final SwiftRegionService regionService); @Override void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback);  }