Simplify SFTP usage.
[lgpl/argeo-commons.git] / org.argeo.core / src / org / argeo / ssh / Sftp.java
index df4dd3a01d1a3354e1477b0914aa053f110fd085..da10b961fd3792fbedf14f959c1fb1dce853d411 100644 (file)
@@ -7,11 +7,16 @@ import java.nio.file.Path;
 
 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 Sftp(String username, String host, int port) {
+               this(AbstractSsh.toUri(username, host, port));
+       }
+
        public Sftp(URI uri) {
                this.uri = uri;
                openSession(uri);