@Test @Ignore public void testArchive() throws Exception { final SFTPCompressFeature feature = new SFTPCompressFeature(session); for(Archive archive : Archive.getKnownArchives()) { final Path workdir = new SFTPHomeDirectoryService(session).find(); final Path test = new Path(workdir, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)); session.getFeature(Touch.class).touch(test, new TransferStatus()); feature.archive(archive, workdir, Collections.singletonList(test), new ProgressListener() { @Override public void message(final String message) { } }, new DisabledTranscriptListener()); assertTrue(new SFTPFindFeature(session).find(archive.getArchive(Collections.singletonList(test)))); new SFTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); assertFalse(new SFTPFindFeature(session).find(test)); feature.unarchive(archive, archive.getArchive(Collections.singletonList(test)), new ProgressListener() { @Override public void message(final String message) { } }, new DisabledTranscriptListener()); assertTrue(new SFTPFindFeature(session).find(test)); new SFTPDeleteFeature(session).delete(Collections.singletonList(archive.getArchive( Collections.singletonList(test) )), new DisabledLoginCallback(), new Delete.DisabledCallback()); new SFTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); } }
public void archive(final Archive archive, final Path workdir, final List<Path> files, final ProgressListener listener, final TranscriptListener transcript) throws BackgroundException { command.send(archive.getCompressCommand(workdir, files), listener, transcript); }
SFTPCompressFeature implements Compress { public void archive(final Archive archive, final Path workdir, final List<Path> files, final ProgressListener listener, final TranscriptListener transcript) throws BackgroundException { command.send(archive.getCompressCommand(workdir, files), listener, transcript); } }
SFTPCompressFeature implements Compress { public void archive(final Archive archive, final Path workdir, final List<Path> files, final ProgressListener listener, final TranscriptListener transcript) throws BackgroundException { command.send(archive.getCompressCommand(workdir, files), listener, transcript); } SFTPCompressFeature(final SFTPSession session); }
SFTPCompressFeature implements Compress { public void archive(final Archive archive, final Path workdir, final List<Path> files, final ProgressListener listener, final TranscriptListener transcript) throws BackgroundException { command.send(archive.getCompressCommand(workdir, files), listener, transcript); } SFTPCompressFeature(final SFTPSession session); void archive(final Archive archive, final Path workdir, final List<Path> files,
                        final ProgressListener listener, final TranscriptListener transcript); void unarchive(final Archive archive, final Path file,
                          final ProgressListener listener, final TranscriptListener transcript); }
SFTPCompressFeature implements Compress { public void archive(final Archive archive, final Path workdir, final List<Path> files, final ProgressListener listener, final TranscriptListener transcript) throws BackgroundException { command.send(archive.getCompressCommand(workdir, files), listener, transcript); } SFTPCompressFeature(final SFTPSession session); void archive(final Archive archive, final Path workdir, final List<Path> files,
                        final ProgressListener listener, final TranscriptListener transcript); void unarchive(final Archive archive, final Path file,
                          final ProgressListener listener, final TranscriptListener transcript);  }