lyftp
ftp文件上传
使用
{
"host": "127.0.0.1",
"port": 8009,
"user": "xxx",
"password": "password",
"remotePath": "webApp/ftptest/",
"upload": {
"default": ["not/"],
"chat": ["wptFtp/not/test/a.txt", "wptFtp/not/test2/"],
"lys": ["lys/bin"]
}
}
在工程文件夹内添加一个.ftprc的json配置文件,配置如上,说明如下
key | 说明 |
---|---|
host | 服务器地址 |
port | 端口 |
user | 用户名 |
password | 密码 |
remotePath | 服务器文件夹 |
upload | 上传文件配置,如上lyftp chat 会上传指定的两个文件/文件夹 |
上传
被上传的文件/文件夹路径,需要是相对.ftprc的相对路径或者是一个绝对路径
命令行上传
lyftp chat
命令行指定文件/文件夹
lyftp --files wptFtp/not/test/a.txt wptFtp/not/test2/