Skip to content
FTP client for lluv library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
rockspecs
src/lua/lluv
test
.travis.yml
LICENSE
README.md
lakeconfig.lua
lakefile

README.md

lluv-ftp - FTP client for lluv library

Licence Build Status Coverage Status

Usage

  local FTP = requrie "lluv.ftp"

  local ftp = FTP.Connection.new(server, {uid = user, pwd = pass})
  ftp:open(function(self, err)

  -- Upload file data from string
  ftp:stor('test.txt', 'hello world', function(self, err) ... end)

  -- Download file with offset and get result as string
  ftp:retr('test.txt', {type = "i", rest = 5}, function(self, err, code, data)
    -- here data is array of file parts
    data = table.concat(data)
  end

  -- Upload data from ltn12 source
  ftp:stor('test.txt', {source = ltn12.source.string('hello world')}, function(self, err) ... end)

  -- Download file to ltn12 sink
  local t = {}
  ftp:retr('test.txt', {sink = ltn12.sink.table(t)}, function(self, err, code, data)
    local data = table.concat(t)
  end
You can’t perform that action at this time.