Skip to content

Commit

Permalink
Allow to query for server extensions available. (#591)
Browse files Browse the repository at this point in the history
Co-authored-by: Jöran Malek <joeran3@gmail.com>
  • Loading branch information
dkocher and AliveDevil authored Jun 5, 2020
1 parent c4fef33 commit 2d8af5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ public int getOperativeProtocolVersion() {
return operativeVersion;
}

public boolean supportsServerExtension(final String extension, final String domain) {
return serverExtensions.containsKey(extension + "@" + domain);
}

public String getServerExtensionData(final String extension, final String domain) {
return serverExtensions.get(extension + "@" + domain);
}

public Request newExtendedRequest(String reqName) {
return newRequest(PacketType.EXTENDED).putString(reqName);
}
Expand Down

0 comments on commit 2d8af5a

Please sign in to comment.