private void checkWriteResponse(Promise<Response, SFTPException> responsePromise) throws SFTPException { responsePromise.retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS).ensureStatusPacketIsOK(); }
@Override public void close() throws IOException { log.debug("Closing `{}`", this); requester.request(newRequest(PacketType.CLOSE)) .retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS) .ensureStatusPacketIsOK(); }
public void remove(String filename) throws IOException { doRequest( newRequest(PacketType.REMOVE).putString(filename, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }
public void setAttributes(String path, FileAttributes attrs) throws IOException { doRequest( newRequest(PacketType.SETSTAT).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs) ).ensureStatusPacketIsOK(); }
public void setAttributes(FileAttributes attrs) throws IOException { requester.request(newRequest(PacketType.FSETSTAT).putFileAttributes(attrs)) .retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS).ensureStatusPacketIsOK(); }
public void makeDir(String path, FileAttributes attrs) throws IOException { doRequest(newRequest(PacketType.MKDIR).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs)).ensureStatusPacketIsOK(); }
public void rename(String oldPath, String newPath) throws IOException { if (operativeVersion < 1) throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.RENAME).putString(oldPath, sub.getRemoteCharset()).putString(newPath, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }
public void symlink(String linkpath, String targetpath) throws IOException { if (operativeVersion < 3) throw new SFTPException("SYMLINK is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.SYMLINK).putString(linkpath, sub.getRemoteCharset()).putString(targetpath, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }
public void remove(String filename) throws IOException { doRequest( newRequest(PacketType.REMOVE).putString(filename) ).ensureStatusPacketIsOK(); }
@Override public void close() throws IOException { log.debug("Closing `{}`", this); requester.request(newRequest(PacketType.CLOSE)) .retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS) .ensureStatusPacketIsOK(); }
@Override public void close() throws IOException { log.debug("Closing `{}`", this); requester.request(newRequest(PacketType.CLOSE)) .retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS) .ensureStatusPacketIsOK(); }
public void setAttributes(String path, FileAttributes attrs) throws IOException { doRequest( newRequest(PacketType.SETSTAT).putString(path).putFileAttributes(attrs) ).ensureStatusPacketIsOK(); }
public void remove(String filename) throws IOException { doRequest( newRequest(PacketType.REMOVE).putString(filename, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }
public void makeDir(String path, FileAttributes attrs) throws IOException { doRequest(newRequest(PacketType.MKDIR).putString(path).putFileAttributes(attrs)).ensureStatusPacketIsOK(); }
public void setAttributes(String path, FileAttributes attrs) throws IOException { doRequest( newRequest(PacketType.SETSTAT).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs) ).ensureStatusPacketIsOK(); }
public void symlink(String linkpath, String targetpath) throws IOException { if (operativeVersion < 3) throw new SFTPException("SYMLINK is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.SYMLINK).putString(linkpath).putString(targetpath) ).ensureStatusPacketIsOK(); }
public void setAttributes(FileAttributes attrs) throws IOException { requester.request(newRequest(PacketType.FSETSTAT).putFileAttributes(attrs)) .retrieve(requester.getTimeoutMs(), TimeUnit.MILLISECONDS).ensureStatusPacketIsOK(); }
public void rename(String oldPath, String newPath) throws IOException { if (operativeVersion < 1) throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.RENAME).putString(oldPath).putString(newPath) ).ensureStatusPacketIsOK(); }
public void symlink(String linkpath, String targetpath) throws IOException { if (operativeVersion < 3) throw new SFTPException("SYMLINK is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.SYMLINK).putString(linkpath, sub.getRemoteCharset()).putString(targetpath, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }
public void rename(String oldPath, String newPath) throws IOException { if (operativeVersion < 1) throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion); doRequest( newRequest(PacketType.RENAME).putString(oldPath, sub.getRemoteCharset()).putString(newPath, sub.getRemoteCharset()) ).ensureStatusPacketIsOK(); }