projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify SFTP usage.
[lgpl/argeo-commons.git]
/
org.argeo.core
/
src
/
org
/
argeo
/
ssh
/
Sftp.java
diff --git
a/org.argeo.core/src/org/argeo/ssh/Sftp.java
b/org.argeo.core/src/org/argeo/ssh/Sftp.java
index df4dd3a01d1a3354e1477b0914aa053f110fd085..da10b961fd3792fbedf14f959c1fb1dce853d411 100644
(file)
--- a/
org.argeo.core/src/org/argeo/ssh/Sftp.java
+++ b/
org.argeo.core/src/org/argeo/ssh/Sftp.java
@@
-7,11
+7,16
@@
import java.nio.file.Path;
import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem;
import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem;
+/** Create an SFTP {@link FileSystem}. */
public class Sftp extends AbstractSsh {
private URI uri;
private SftpFileSystem fileSystem;
public class Sftp extends AbstractSsh {
private URI uri;
private SftpFileSystem fileSystem;
+ public Sftp(String username, String host, int port) {
+ this(AbstractSsh.toUri(username, host, port));
+ }
+
public Sftp(URI uri) {
this.uri = uri;
openSession(uri);
public Sftp(URI uri) {
this.uri = uri;
openSession(uri);