From 09cf21f61aaa2402238b173296e3e6a981a92baa Mon Sep 17 00:00:00 2001 From: Neil Prosser Date: Sat, 27 Aug 2011 00:30:20 +0100 Subject: [PATCH] Some stateful methods that needed cwdifying --- .../schmizz/sshj/sftp/StatefulSFTPClient.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/schmizz/sshj/sftp/StatefulSFTPClient.java b/src/main/java/net/schmizz/sshj/sftp/StatefulSFTPClient.java index 9013ec61..7f47d63f 100644 --- a/src/main/java/net/schmizz/sshj/sftp/StatefulSFTPClient.java +++ b/src/main/java/net/schmizz/sshj/sftp/StatefulSFTPClient.java @@ -19,6 +19,9 @@ import java.io.IOException; import java.util.List; import java.util.Set; +import net.schmizz.sshj.xfer.LocalDestFile; +import net.schmizz.sshj.xfer.LocalSourceFile; + public class StatefulSFTPClient extends SFTPClient { @@ -171,17 +174,47 @@ public class StatefulSFTPClient throws IOException { return super.canonicalize(cwdify(path)); } + + @Override + public void chown(String path, int uid) + throws IOException { + super.chown(cwdify(path), uid); + } + + @Override + public void chmod(String path, int perms) + throws IOException { + super.chmod(cwdify(path), perms); + } + + @Override + public void chgrp(String path, int gid) + throws IOException { + super.chgrp(cwdify(path), gid); + } @Override public void get(String source, String dest) throws IOException { super.get(cwdify(source), dest); } + + @Override + public void get(String source, LocalDestFile dest) + throws IOException { + super.get(cwdify(source), 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)); + } + }