Copying a file in sftp with jsch library

前端 未结 1 2071
北海茫月
北海茫月 2021-01-04 11:04
import com.jcraft.jsch.*;

public class App {
public static void main(String args[]) {
    JSch jsch = new JSch();
    Session session = null;
    try {
        sess         


        
相关标签:
1条回答
  • 2021-01-04 11:08

    Do a copy of the remote file and then delete it

    ChannelSftp.get("remotefile.txt", "localfile.txt");
    ChannelSftp.rm("remotefile.txt")
    
    0 讨论(0)
提交回复
热议问题