@Test public void testTouchFileStartWithDot() throws Exception { final Host host = new Host(new AzureProtocol(), "kahy9boj3eib.blob.core.windows.net", new Credentials( System.getProperties().getProperty("azure.account"), System.getProperties().getProperty("azure.key") )); final AzureSession session = new AzureSession(host); new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener()).connect(session, PathCache.empty(), new DisabledCancelCallback()); final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume)); final Path test = new Path(container, String.format(".%s.", UUID.randomUUID().toString()), EnumSet.of(Path.Type.file)); new AzureTouchFeature(session, null).touch(test, new TransferStatus()); new AzureDeleteFeature(session, null).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); }
@Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { status.setChecksum(writer.checksum(file, status).compute(new NullInputStream(0L), status)); new DefaultStreamCloser().close(writer.write(file, status, new DisabledConnectionCallback())); return new Path(file.getParent(), file.getName(), file.getType(), new AzureAttributesFinderFeature(session, context).find(file)); }
AzureTouchFeature implements Touch<Void> { @Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { status.setChecksum(writer.checksum(file, status).compute(new NullInputStream(0L), status)); new DefaultStreamCloser().close(writer.write(file, status, new DisabledConnectionCallback())); return new Path(file.getParent(), file.getName(), file.getType(), new AzureAttributesFinderFeature(session, context).find(file)); } }
AzureTouchFeature implements Touch<Void> { @Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { status.setChecksum(writer.checksum(file, status).compute(new NullInputStream(0L), status)); new DefaultStreamCloser().close(writer.write(file, status, new DisabledConnectionCallback())); return new Path(file.getParent(), file.getName(), file.getType(), new AzureAttributesFinderFeature(session, context).find(file)); } AzureTouchFeature(final AzureSession session, final OperationContext context); }
AzureTouchFeature implements Touch<Void> { @Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { status.setChecksum(writer.checksum(file, status).compute(new NullInputStream(0L), status)); new DefaultStreamCloser().close(writer.write(file, status, new DisabledConnectionCallback())); return new Path(file.getParent(), file.getName(), file.getType(), new AzureAttributesFinderFeature(session, context).find(file)); } AzureTouchFeature(final AzureSession session, final OperationContext context); @Override boolean isSupported(final Path workdir, final String filename); @Override Path touch(final Path file, final TransferStatus status); @Override AzureTouchFeature withWriter(final Write<Void> writer); }
AzureTouchFeature implements Touch<Void> { @Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { status.setChecksum(writer.checksum(file, status).compute(new NullInputStream(0L), status)); new DefaultStreamCloser().close(writer.write(file, status, new DisabledConnectionCallback())); return new Path(file.getParent(), file.getName(), file.getType(), new AzureAttributesFinderFeature(session, context).find(file)); } AzureTouchFeature(final AzureSession session, final OperationContext context); @Override boolean isSupported(final Path workdir, final String filename); @Override Path touch(final Path file, final TransferStatus status); @Override AzureTouchFeature withWriter(final Write<Void> writer);  }