mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Added default blocksize to Net::FTP#getbinaryfile
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
79c2d60971
commit
468df0e2d4
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue