[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-ftp - directory vs file?

Marc Heiler

6/4/2008 4:33:00 PM

How do I find out whether "foobar" is a remote directory, or a remote
file?

I don't seem to find any trivial way to check this.
Has this maybe been forgotten?
--
Posted via http://www.ruby-....

4 Answers

Marc Heiler

6/4/2008 8:15:00 PM

0

Solved it via .list (and help of someone else)

"drwxrwxrwx 2 web netscape 8192 Oct 29 2007 images"

The first pos indicates a dir.

However I think it would be nice if the ruby ftp class could be extended
to allow easy checks like that, as does standard ruby ( i.e.
File.directory? )
--
Posted via http://www.ruby-....

David Masover

6/4/2008 8:56:00 PM

0

On Wednesday 04 June 2008 15:14:56 Marc Heiler wrote:

> "drwxrwxrwx 2 web netscape 8192 Oct 29 2007 images"
>
> The first pos indicates a dir.

By convention, I think. That's a Unix-style mask, as you would get
with 'ls -l'. Have you tried it on a Windows host?

I'm not sure there's anything built into the FTP protocol to show that it's a
directory.

Marc Heiler

6/5/2008 8:07:00 AM

0

> Have you tried it on a Windows host?

No I haven't. :)

In fact I dont know of a windows ftp host at all, all the ones I worked
with are always unix-style, and for these the "ls -l" will work. I
wonder if others will also end up doing the same checks as I did, or
maybe noone else is using the ruby-ftp stuff... people should build more
ruby-GUIs, there are plenty of things one can combine into these GUIs :D
--
Posted via http://www.ruby-....

WartRemover

8/14/2010 3:56:00 AM

0

In article <nbo9o.14847$1F6.695@newsfe01.iad>,
"WeReo_BoY" <scottamerica@ixpres.com> wrote:

> "marcus" <marcus60s@yahoo.com> wrote in message
> news:a83716bf-5b13-4599-9d65-4e74dcffc2d5@d8g2000yqf.googlegroups.com...
> On Aug 13, 6:14 pm, "WeReo_BoY" <scottamer...@ixpres.com> wrote:
> > ON THIS DAY IN 1965 - The Beatles arrived at Kennedy Airport for a tour in
> > North America. Saturday the 14th was reserved for a taping for the Ed
> > Sullivan. This classic Shea Stadium concert took place on the 15th. This
> > was
> > the first time in the history of music that a stadium was used
> > for a rock concert ! Seen by 55,600 fans, it cre......ated a new world
> > record
> > for a pop concert in terms of attendance and gross revenue. The Beatles'
> > share of the $304,000 box-office takings was also a record - $160,000.
> >
> > (Courtesy of my pal Glenn for this)
>
> Hard to believe that it's been 45 years since I first saw The Beatles
> at Shea...come to think of it, it's hard to believe that I'm old
> enough to remember 45 years ago.
>
> What are you worried about? I have you beat by a year, at least.

NO ONE CARES about ANYTHING u YAP about PiGGy so SHUT UP & DIE
--
"The world has moved on, leaving the non-entity Scott Lifshine in its wake"
-Greendistantstar

oWo
|---|