Skip to content

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 distribution

License

Notifications You must be signed in to change notification settings

demonterminal/Cpp-file-downloading-library-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cpp-file-downloading-library-linux

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.

Here's the tutorial

Step 1 : Download the library and install it in the local directory where your C++ file is

Step 2 : Include the library in your C++ file.

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

Example

// 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;
}

Explanation

  • 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 the Downloader.h for downloading files
  • Calling downloadFile function of Downloader class for downloading file which takes the url and then downloades the file from url.

Thanks for reading

About

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 distribution

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages