Is there a ftp crawler in ruby on rails?

31 views
Skip to first unread message

narayana perla

unread,
Jun 1, 2012, 5:04:42 PM6/1/12
to rubyonra...@googlegroups.com
Hi,

I'm a newbie to ROR. I wanted to write some code which can help me to
list and then index all the paths on a remote server. Is there a ftp
server crawler in ruby?

Thanks,
Narayana

--
Posted via http://www.ruby-forum.com/.

Everaldo Gomes

unread,
Jun 1, 2012, 5:11:19 PM6/1/12
to rubyonra...@googlegroups.com
Hi,

maybe you could use the Dir class:

http://www.ruby-doc.org/core-1.9.3/Dir.html

By the way, I didn't understand very well what you want to do...

Best Regards,
Everaldo
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>

narayana perla

unread,
Jun 1, 2012, 5:18:56 PM6/1/12
to rubyonra...@googlegroups.com
Hi Everaldo,

Thanks for the info. Im trying to make a database of (Name(can be an ID
or filename), Path) of certain directories on several paths residing on
remote servers.

Thanks,
Narayana.

Scott Ribe

unread,
Jun 1, 2012, 5:33:36 PM6/1/12
to rubyonra...@googlegroups.com
On Jun 1, 2012, at 3:18 PM, narayana perla wrote:

> Thanks for the info. Im trying to make a database of (Name(can be an ID
> or filename), Path) of certain directories on several paths residing on
> remote servers.

When you do watch out for this: there is no standard for how FTP formats directory listings. Different OSs and different FTP servers use different formats, so you just have to figure them out. It's kind of an ugly problem.

--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




Matt Jones

unread,
Jun 2, 2012, 11:14:39 AM6/2/12
to rubyonra...@googlegroups.com


On Friday, 1 June 2012 17:04:42 UTC-4, Ruby-Forum.com User wrote:
Hi,

I'm a newbie to ROR. I wanted to write some code which can help me to
list and then index all the paths on a remote server. Is there a ftp
server crawler in ruby?


Take a look at Net::FTP, in the standard library:


It should do what you're looking for.

--Matt Jones
 
Reply all
Reply to author
Forward
0 new messages