FTP#mget, FTP#mput

<snip>

I guess I'm not sure how this is different that just doing something
like this:

module Net
   class FTP
      def mput(pattern, &block)
         Dir[pattern].each{ |file| put(file, &block) }
      end

      def mget(pattern, &block)
         Dir[pattern].each{ |file| get(file, &block) }
      end
   end
end

I haven't test that, but if it looks alright perhaps I'll submit it as a
patch to -core.

Regards,

Dan

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

···

-----Original Message-----
From: ara.t.howard@noaa.gov [mailto:ara.t.howard@noaa.gov]
Sent: Tuesday, May 09, 2006 1:29 PM
To: ruby-talk ML
Subject: Re: FTP#mget, FTP#mput

On Wed, 10 May 2006, Daniel Berger wrote:

> Hi all,
>
> Is there a method in Net::FTP that corresponds to ftp's
mget and mput
> functions?
>
> If not, is there any chance of adding this to ftp.rb?
>
> Thanks,
>
> Dan

this does something like mput

Dir[pattern] is on the __client__. globbing for mget most occur against a
listing from the __server__.

   eg.

     mget foo*

   means get all files from the server that match foo* - the only way to do
   this is to combine an ftp.list with fnmatch.

regards.

-a

···

On Thu, 11 May 2006, Berger, Daniel wrote:

-----Original Message-----
From: ara.t.howard@noaa.gov [mailto:ara.t.howard@noaa.gov]
Sent: Tuesday, May 09, 2006 1:29 PM
To: ruby-talk ML
Subject: Re: FTP#mget, FTP#mput

On Wed, 10 May 2006, Daniel Berger wrote:

Hi all,

Is there a method in Net::FTP that corresponds to ftp's

mget and mput

functions?

If not, is there any chance of adding this to ftp.rb?

Thanks,

Dan

this does something like mput

<snip>

I guess I'm not sure how this is different that just doing something
like this:

module Net
  class FTP
     def mput(pattern, &block)
        Dir[pattern].each{ |file| put(file, &block) }
     end

     def mget(pattern, &block)
        Dir[pattern].each{ |file| get(file, &block) }
     end

--
be kind whenever possible... it is always possible.
- h.h. the 14th dali lama

From: ara.t.howard@noaa.gov [mailto:ara.t.howard@noaa.gov]
Sent: Tuesday, May 09, 2006 1:29 PM
To: ruby-talk ML
Subject: Re: FTP#mget, FTP#mput

Hi all,

Is there a method in Net::FTP that corresponds to ftp's

mget and mput

functions?

If not, is there any chance of adding this to ftp.rb?

Thanks,

Dan

this does something like mput

<snip>

I guess I'm not sure how this is different that just doing something
like this:

module Net
   class FTP
      def mput(pattern, &block)
         Dir[pattern].each{ |file| put(file, &block) }
      end

      def mget(pattern, &block)
         Dir[pattern].each{ |file| get(file, &block) }
      end
   end
end

I haven't test that, but if it looks alright perhaps I'll submit it as a
patch to -core.

Regards,

Dan

I'm not sure but I think mget's pattern is supposed to apply on the server, not the local system. I could be wrong though.

···

On May 10, 2006, at 12:06 PM, Berger, Daniel wrote:

-----Original Message-----
On Wed, 10 May 2006, Daniel Berger wrote:

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.