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-forum.com/.
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-forum.com/.
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-forum.com/.
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.
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.
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
--
Posted via http://www.ruby-forum.com/\.