summaryrefslogtreecommitdiffstats
path: root/lib/net/ftp.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-17 03:14:22 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-17 03:14:22 +0000
commit405fa7b2f2091051dcc99a44819679ef1c61f5bd (patch)
treed298b33851aaf473430dc9effccd7b7638d33910 /lib/net/ftp.rb
parent439dc536f182398f49dbf6995f88bec2db82eb7e (diff)
downloadruby-405fa7b2f2091051dcc99a44819679ef1c61f5bd.tar.gz
ruby-405fa7b2f2091051dcc99a44819679ef1c61f5bd.tar.xz
ruby-405fa7b2f2091051dcc99a44819679ef1c61f5bd.zip
Added default blocksize to Net::FTP#getbinaryfile
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/ftp.rb')
-rw-r--r--lib/net/ftp.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index a63acec1d..ab10853be 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -25,6 +25,8 @@ module Net
FTP_PORT = 21
CRLF = "\r\n"
+
+ DEFAULT_BLOCKSIZE = 4096
attr_accessor :passive, :return_code, :debug_mode, :resume
attr_reader :welcome, :lastresp
@@ -338,7 +340,8 @@ module Net
end
end
- def getbinaryfile(remotefile, localfile, blocksize, callback = nil)
+ def getbinaryfile(remotefile, localfile,
+ blocksize = DEFAULT_BLOCKSIZE, callback = nil)
if iterator?
callback = Proc.new
end
@@ -378,7 +381,8 @@ module Net
end
end
- def putbinaryfile(localfile, remotefile, blocksize = 4096, callback = nil)
+ def putbinaryfile(localfile, remotefile,
+ blocksize = DEFAULT_BLOCKSIZE, callback = nil)
if iterator?
callback = Proc.new
end