You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localFTP=requrie"lluv.ftp"localftp=FTP.Connection.new(server, {uid=user, pwd=pass})
ftp:open(function(self, err)
-- Upload file data from stringftp:stor('test.txt', 'hello world', function(self, err) ...end)
-- Download file with offset and get result as stringftp:retr('test.txt', {type="i", rest=5}, function(self, err, code, data)
-- here data is array of file partsdata=table.concat(data)
end-- Upload data from ltn12 sourceftp:stor('test.txt', {source=ltn12.source.string('hello world')}, function(self, err) ...end)
-- Download file to ltn12 sinklocalt= {}
ftp:retr('test.txt', {sink=ltn12.sink.table(t)}, function(self, err, code, data)
localdata=table.concat(t)
end