newbie question for lua and luasocket

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

newbie question for lua and luasocket

Theodor-Iulian Ciobanu-2
Hello lua,

(also posted on the forum, as I just joined the mailing list. I apologize for the double post)

I want to upload a specified folder to a remote locatin through FTP. But there are two things I don't know how to do in/with Lua:
1) Obtain the listing of a given folder, to know what files to upload
2) Create a folder on the remote system using. I know the FTP command for this is MKD, it returns 257 on succesul creation of the folder. I did try something with LuaSocket, but it didn't work.

Any suggestions? (Links to documentation, code snippets etc)

-- 
Theodor-Iulian Ciobanu
jr Virus Researcher

e-mail: [hidden email]

-----------------------------------------
Secure your every bit
-----------------------------------------



-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://www.bitdefender.com/


Reply | Threaded
Open this post in threaded view
|

Re: newbie question for lua and luasocket

D Burgess-4
1) Obtain the listing of a given folder, to know what files to upload
use lhf's lposix implementation.

 http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/lposix.tar.gz


2) Create a folder on the remote system using. I know the FTP command for this is MKD, it returns 257 on succesul creation of the folder. I did try something with LuaSocket, but it didn't work.

read ftp.lua in the Lua socket package.

DB

Reply | Threaded
Open this post in threaded view
|

Re: newbie question for lua and luasocket

Christof Schardt
In reply to this post by Theodor-Iulian Ciobanu-2
> 1) Obtain the listing of a given folder, to know what files to upload

Did you see LuaFilesystem? http://www.keplerproject.org/luafilesystem/

Christof Schardt
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re[2]: newbie question for lua and luasocket

Theodor-Iulian Ciobanu-2
Hello Christof,

Sunday, August 6, 2006, 8:20:55 AM, you wrote:

CS> Did you see LuaFilesystem? http://www.keplerproject.org/luafilesystem/

I was just going to say I found LFS and am thinking of trying that instead of lposix.

As for the docs on FTP in LuaSocket, all they mention is how to use put and get. I'll have to do go through the samples provided, maybe I'll be able to figure out what I'm doing wrong.

-- 
Theodor-Iulian Ciobanu
jr Virus Researcher

e-mail: [hidden email]

-----------------------------------------
Trying to secure your every bit
-----------------------------------------



-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://www.bitdefender.com/