mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 08:10:55 +03:00
Some stateful methods that needed cwdifying
This commit is contained in:
@@ -19,6 +19,9 @@ import java.io.IOException;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.schmizz.sshj.xfer.LocalDestFile;
|
||||||
|
import net.schmizz.sshj.xfer.LocalSourceFile;
|
||||||
|
|
||||||
public class StatefulSFTPClient
|
public class StatefulSFTPClient
|
||||||
extends SFTPClient {
|
extends SFTPClient {
|
||||||
|
|
||||||
@@ -172,16 +175,46 @@ public class StatefulSFTPClient
|
|||||||
return super.canonicalize(cwdify(path));
|
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
|
@Override
|
||||||
public void get(String source, String dest)
|
public void get(String source, String dest)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
super.get(cwdify(source), dest);
|
super.get(cwdify(source), dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void get(String source, LocalDestFile dest)
|
||||||
|
throws IOException {
|
||||||
|
super.get(cwdify(source), dest);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(String source, String dest)
|
public void put(String source, String dest)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
super.put(source, cwdify(dest));
|
super.put(source, cwdify(dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(LocalSourceFile source, String dest)
|
||||||
|
throws IOException {
|
||||||
|
super.put(source, cwdify(dest));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user