@Override public void put(String source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public void put(LocalSourceFile source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public void put(String source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public void put(LocalSourceFile source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public void put(LocalSourceFile source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public void put(String source, String dest) throws IOException { super.put(source, cwdify(dest)); }
@Override public Void create() throws Exception { sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { return contents.getContentMetadata().getContentLength(); } @Override public InputStream getInputStream() throws IOException { return checkNotNull(contents.getInput(), "inputstream for path %s", path); } }, path); } finally { contents.release(); } return null; }
@Override public Void create() throws Exception { sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { return contents.getContentMetadata().getContentLength(); } @Override public InputStream getInputStream() throws IOException { return checkNotNull(contents.getInput(), "inputstream for path %s", path); } }, path); } finally { contents.release(); } return null; }
@Override public Void create() throws Exception { sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { return contents.getContentMetadata().getContentLength(); } @Override public InputStream getInputStream() throws IOException { return checkNotNull(contents.getInput(), "inputstream for path %s", path); } }, path); } finally { contents.release(); } return null; }
@Override public Void create() throws Exception { sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { Long length = contents.getContentMetadata().getContentLength(); return length != null ? length : -1; } @Override public InputStream getInputStream() throws IOException { return checkNotNull(contents.getInput(), "inputstream for path %s", path); } }, path); } finally { contents.release(); } return null; }
@Override public Void create() throws Exception { sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { Long length = contents.getContentMetadata().getContentLength(); return length != null ? length : -1; } @Override public InputStream getInputStream() throws IOException { return checkNotNull(contents.getInput(), "inputstream for path %s", path); } }, path); } finally { contents.release(); } return null; }
@Override public Void create() throws Exception { final AtomicReference<InputStream> inputStreamRef = new AtomicReference<InputStream>(); sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { return length; } @Override public InputStream getInputStream() throws IOException { InputStream contents = contentsSupplier.get(); inputStreamRef.set(contents); return contents; } }, path); sftp.chmod(path, permissionsMask); if (lastAccessDate > 0) { sftp.setattr(path, new FileAttributes.Builder() .withAtimeMtime(lastAccessDate, lastModificationDate) .build()); } } finally { closeWhispering(inputStreamRef.get(), this); } return null; }
sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path;