[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua and sftp?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 4 Mar 2013 12:21:28 +0200
2013/3/4 albert <albert_200200@126.com>:
> I need to do such work in lua,
> 1、I need to get the directory file lists under a remote sftp server
> directory.
> 2、Download some files from the sftp server.
> 3、Upload some local files to the sftp server.
> How can I fulfill the need? Any advice would be kind.
If your system supports command-line sftp, the easiest is
function sftp(params,source,target)
os.execute (("sftp %s %s %s"):format(params or "",source,target))
end