How to use the ftp list command

This is how to perform an ftp list command using net.ftp.list from the net module.

This example uses a publically available test server, which is enabled for list and get only.

Here is the code for you to copy:

function main() 
   local id=net.ftp.init{
      server='ftp.secureftp-test.com', 
      username='test', password='test'}
   id:list{remote_path='/'}
   id:list{remote_path='/subdir1'}
end

Leave A Comment?