Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "sftp-j", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "上传或者下载服务器文件", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,4 +10,4 @@ ## Installation | ||
```javascript | ||
const SftpTool = require("./test.js"); | ||
const sftp6 = new SftpTool({ | ||
const SftpTool = require("sftp-j"); | ||
const sftp = new SftpTool({ | ||
host: "your server ip address", | ||
@@ -22,3 +22,3 @@ port: "", | ||
//local file remote file | ||
let res = await sftp6.downloadFile("./1.txt", "/root/test/1.txt"); | ||
let res = await sftp.downloadFile("./1.txt", "/root/test/1.txt"); | ||
console.log(res); | ||
@@ -29,5 +29,5 @@ })(); | ||
(async () => { | ||
let res = await sftp6.uploadFile("./1.txt", "/root/test/1.txt"); | ||
let res = await sftp.uploadFile("./1.txt", "/root/test/1.txt"); | ||
console.log(res); | ||
})(); | ||
``` |
2123