@Test public void testFindKey() throws Exception { final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); container.attributes().setRegion("IAD"); final Path file = new Path(container, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)); assertFalse(new SwiftFindFeature(session).find(file)); try { new DefaultAttributesFinderFeature(session).find(file); fail(); } catch(NotfoundException e) { } new SwiftTouchFeature(session, new SwiftRegionService(session)).touch(file, new TransferStatus()); assertTrue(new SwiftFindFeature(session).find(file)); assertNotNull(new DefaultAttributesFinderFeature(session).find(file)); }
@Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { feature.getMetadata(file); return true; } catch(NotfoundException e) { return false; } }
SwiftFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { feature.getMetadata(file); return true; } catch(NotfoundException e) { return false; } } }
SwiftFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { feature.getMetadata(file); return true; } catch(NotfoundException e) { return false; } } SwiftFindFeature(final SwiftSession session);  SwiftFindFeature(final Headers feature); }
SwiftFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { feature.getMetadata(file); return true; } catch(NotfoundException e) { return false; } } SwiftFindFeature(final SwiftSession session);  SwiftFindFeature(final Headers feature); @Override boolean find(final Path file); }
SwiftFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { feature.getMetadata(file); return true; } catch(NotfoundException e) { return false; } } SwiftFindFeature(final SwiftSession session);  SwiftFindFeature(final Headers feature); @Override boolean find(final Path file);  }