Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Resume download using ftp url connection

 
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use ftp url connection for getting files from a FTP server. It works fine, however sometime conection gets lost, so I have to restart the process. Since I use this for backup purpose, transfered files can be quite large (about 10-20GB), it's pitty to restart complete download at mostly finished file. I know that ftp clients as wget support resume. How can I do resume using ftp url connection? Pointing me to ftp RFC is more than sufficient.
 
Marshal
Posts: 25823
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google's first link for the keywords "ftp url" looks pretty good to me:

http://www.cs.tut.fi/~jkorpela/ftpurl.html

It contains references to the actual RFCs if you really want to read them, but from that page it's clear that there is no option in the URL to do anything but get an entire file.

There are probably FTP commands to start reading partway through the file, but you would have to be using an FTP client to use those commands, not just a URL.
 
D Rog
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it looks like I can subclass ftp url connection to access underneath ftp client object and reach desirable behavior. I can also register my URL handler to make process of using my class automatic. Strange that google gives you links from Finland.
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To perform a FTP resume you must issue the REST command to the server. I'm not sure that the ftp url syntax will allow you to do this as when using the ftp url syntax there is no way of telling it the offset from which to resume file transfer. To accomplish this you would need to use raw sockets.
 
Well THAT's new! Comfort me, reliable tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic