安装
- ssh2-sftp-client (npm)
npm install ssh2-sftp-client
API
rmdir(romotePath, true)
递归删除服务器文件夹uploadDir(localPath, romotePath)
递归上传文件夹put(localPath, romotePath)
get(romotePath, localPath)
demo
const Client = require('ssh2-sftp-client')
// const path = require('path')
const config =