Module: receive-file

Module for download file (use stream methods)
Version:
  • 2.0.1
Author:
License:
  • MIT
Source:

Requires

  • module:fs
  • module:url
  • module:http
  • module:https
  • module:path

Namespaces

ReceiveFileSettings

Methods

(async, inner) ReceiveFile(url, options, callback) → {Promise.<string>}

File download function
Parameters:
Name Type Description
url string file download link
options ReceiveFileSettings download settings object
callback ReceiveFileCallback if not set, promise will be returned
Source:
Returns:
path - path where the file was downloaded
Type
Promise.<string>

Type Definitions

ReceiveFileCallback(err, path)

ReceiveFile Callback Function, if not set, promise will be returned
Parameters:
Name Type Description
err Error if the request completed with an error, or undefined
path string if the request is successful, or undefined
Source: