@Test public void testFile() { final Host host = new Host(new SpectraProtocol() { @Override public Scheme getScheme() { return Scheme.http; } }, System.getProperties().getProperty("spectra.hostname"), Integer.valueOf(System.getProperties().getProperty("spectra.port")), new Credentials( System.getProperties().getProperty("spectra.user"), System.getProperties().getProperty("spectra.key") )); final SpectraSession session = new SpectraSession(host, new DisabledX509TrustManager(), new DefaultX509KeyManager()); assertFalse(new SpectraTouchFeature(session).isSupported(new Path("/", EnumSet.of(Path.Type.volume)), StringUtils.EMPTY)); assertTrue(new SpectraTouchFeature(session).isSupported(new Path(new Path("/", EnumSet.of(Path.Type.volume)), "/container", EnumSet.of(Path.Type.volume)), StringUtils.EMPTY)); }
@Override public boolean isSupported(final Path workdir, final String filename) { return !workdir.isRoot(); }
SpectraTouchFeature implements Touch { @Override public boolean isSupported(final Path workdir, final String filename) { return !workdir.isRoot(); } }
SpectraTouchFeature implements Touch { @Override public boolean isSupported(final Path workdir, final String filename) { return !workdir.isRoot(); } SpectraTouchFeature(final SpectraSession session); }
SpectraTouchFeature implements Touch { @Override public boolean isSupported(final Path workdir, final String filename) { return !workdir.isRoot(); } SpectraTouchFeature(final SpectraSession session); @Override Path touch(final Path file, final TransferStatus transferStatus); @Override boolean isSupported(final Path workdir, final String filename); @Override SpectraTouchFeature withWriter(final Write writer); }
SpectraTouchFeature implements Touch { @Override public boolean isSupported(final Path workdir, final String filename) { return !workdir.isRoot(); } SpectraTouchFeature(final SpectraSession session); @Override Path touch(final Path file, final TransferStatus transferStatus); @Override boolean isSupported(final Path workdir, final String filename); @Override SpectraTouchFeature withWriter(final Write writer);  }