This is an C++ File Downloading Library which is only for linux which provides a Easy C++ interface for downloading the files from internet via a Linux distributions. With this library you can easily download files directly from internet without writting complex programs. thus library can be easily installed in the local directory or compiler std directory for CPP compilation.
Step 3 : Downloader provide a Downloader class which you need to inherit for downlaoding a file eg Downloader downloader
Step 4 : Call the inheritance of the Downloader class snd use the downloadFile(url, output_path); for downloading a file and saving it to the local path
// including header files
#include <iostream>
#include "Downloader.h"
// main
int main(){
// Downloader class inheritance
Downloader downloader;
downloader.downloadFile("https://github.com/demonterminal/Demon-Liner-Sight---Source-code/archive/refs/heads/main.zip", "demonterminal.zip");// Downloading the demon terminal from the official github repo, Please replace the url and path to make it properly
return 0;
}
- We started code by including cpp iostrean which is the standard headerfile of cpp and
Downloader.h
which is this headerfile for downloading files from internet. - Declaration of main function which is used for console IO or console projects.
- Instantiating the
Download
class provided by theDownloader.h
for downloading files - Calling
downloadFile
function ofDownloader
class for downloading file which takes the url and then downloades the file from url.
Thanks for reading