@Test public void testFindFile() throws Exception { final Path file = new Path(new SFTPHomeDirectoryService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)); new SFTPTouchFeature(session).touch(file, new TransferStatus()); assertTrue(new SFTPFindFeature(session).find(file)); new SFTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback()); }
@Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { new SFTPAttributesFinderFeature(session).find(file); return true; } catch(NotfoundException e) { return false; } }
SFTPFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { new SFTPAttributesFinderFeature(session).find(file); return true; } catch(NotfoundException e) { return false; } } }
SFTPFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { new SFTPAttributesFinderFeature(session).find(file); return true; } catch(NotfoundException e) { return false; } } SFTPFindFeature(final SFTPSession session); }
SFTPFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { new SFTPAttributesFinderFeature(session).find(file); return true; } catch(NotfoundException e) { return false; } } SFTPFindFeature(final SFTPSession session); @Override boolean find(final Path file); }
SFTPFindFeature implements Find { @Override public boolean find(final Path file) throws BackgroundException { if(file.isRoot()) { return true; } try { new SFTPAttributesFinderFeature(session).find(file); return true; } catch(NotfoundException e) { return false; } } SFTPFindFeature(final SFTPSession session); @Override boolean find(final Path file);  }