Skip to content
Marcus Ottosson edited this page Jan 25, 2015 · 2 revisions

Goal

To build a standalone terminal application that downloads a given file onto disk.

$ lc_download
Please enter a URL
$ lc_download https://raw.githubusercontent.com/learnclang/current/master/img/c.png
$ ./c.png

Starts Monday, 12 January 2015

As with our first Hello, World! program, we will be exploring various ways of reaching our goal, that is why most of the requirements below are optional, as we do not yet know what the project may entail or where it will take us. :)

The project MUST include:

  • A standalone, potentially platform-dependent application for downloading a file via a terminal.

The project MAY include:

  • Linking with a standard or third-party library
  • In order to establish a connection with a remote server
  • Reading from that connection
  • Opening and writing to a file the result
  • Multiple solutions

The rules are that we may use any resources we have available to us, including internet and StackOverflow and such, as long as we understand and clearly document exactly what is happening and why in this project's Wiki and Issues.

There may be more than one solution, in fact I encourage you to! Some may take the easy-road and utilise libraries which I am sure there are, whereas other solutions may go closer to the metal and really get close to pulling those bytes off of a connection, buffering an amount in memory, and finally flushing bits out to disk.