method
getbinaryfile
v2_4_6 -
Show latest stable
- Class:
Net::FTP
getbinaryfile(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE)public
Retrieves remotefile in binary mode, storing the result in localfile. If localfile is nil, returns retrieved data. If a block is supplied, it is passed the retrieved data in blocksize chunks.
1Note
writes the file to disk even if you pass a block
I was surprised to find that the local file is opened and written even if you pass the block. If you're local working directory isn't writeable or doesn't have the space, you're out of luck.