@Test public void testAppend() throws Exception { final Path workdir = new SFTPHomeDirectoryService(session).find(); final Path test = new Path(workdir, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)); assertFalse(new SFTPWriteFeature(session).append(test, 0L, PathCache.empty()).append); new SFTPTouchFeature(session).touch(test, new TransferStatus()); assertTrue(new SFTPWriteFeature(session).append(test, 0L, PathCache.empty()).append); new SFTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); }
@Override public boolean random() { return true; }
SFTPWriteFeature extends AppendWriteFeature<Void> { @Override public boolean random() { return true; } }
SFTPWriteFeature extends AppendWriteFeature<Void> { @Override public boolean random() { return true; } SFTPWriteFeature(final SFTPSession session); }
SFTPWriteFeature extends AppendWriteFeature<Void> { @Override public boolean random() { return true; } SFTPWriteFeature(final SFTPSession session); @Override StatusOutputStream<Void> write(final Path file, final TransferStatus status, final ConnectionCallback callback); @Override boolean temporary(); @Override boolean random(); }
SFTPWriteFeature extends AppendWriteFeature<Void> { @Override public boolean random() { return true; } SFTPWriteFeature(final SFTPSession session); @Override StatusOutputStream<Void> write(final Path file, final TransferStatus status, final ConnectionCallback callback); @Override boolean temporary(); @Override boolean random();  }