Re: Net::FTP questions...
- From: Lincoln Anderson <ayblinkin@xxxxxxxxx>
- Date: Tue, 12 Sep 2006 23:51:14 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Arnoux wrote:
Hi,
Le mardi 12 septembre 2006 à 07:39 +0900, Lincoln Anderson a écrit
:
Here's where my problem comes in. How can I tell from the list
array whether an item is a directory or a file to be copied? Is
there something I can use (such as an FTP command) to catch a
clue on how to implement this? I know this is possible, as
ftpmirror is done with PERL and Ruby can do anything PERL can do
- better :)
The output of FTP#ls should be something like : drwxr-x--- 2
login ftp 96 Sep 11 16:07 mydir -rwxr-x--- 2 login ftp
96 Sep 11 16:07 myfile
So you will know an entry is a directory if the string begins by
"d".
Vincent
Yeah, I noticed that after my post... I guess I was trying to
complicate things :)
Thanks,
Lincoln Anderson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFBsk+Kte2c0P8BH0RAgagAJ99pzUNbgqd4Xla9/NYxXfCqt7ZJgCfc0qd
oC7upPw6SIZTOEMr17A66FE=
=hrJu
-----END PGP SIGNATURE-----
.
- References:
- Net::FTP questions...
- From: Lincoln Anderson
- Re: Net::FTP questions...
- From: Vincent Arnoux
- Net::FTP questions...
- Prev by Date: Re: [ANN] New Ruby Web Site is Officially Launched
- Next by Date: Re: The economics of a slow but productive Ruby
- Previous by thread: Re: Net::FTP questions...
- Next by thread: Re: Net::FTP questions...
- Index(es):
Relevant Pages
|