I have an ftp://host/path
URL and want to download the file and resume download if conn开发者_JS百科ection is lost in Erlang.
Starting the download is easy enough using the ftp module, but how can I resume it?
Yeah.. like Peer mentioned.. you have to add the functionality into the erlang module.. I had submitted a patch for the FTP module that does exactly this : https://gist.github.com/700908
Basically i have exposed a recv_chunk_start/3 API into the FTP module..which takes in an extra "Pos" parameter to resume FTP download from that position.
Please note.. 1) The FTP server must understand the RETR command (some servers dont handle this -or- is dissabled) 2) this patch will work only with erlang-R13B04.. have to create a new patch for R14B.
精彩评论