Getting Started
Installation
Usage
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Documentation
Array
Date
Environment
FileSystem
HTTP
Math
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer
download
pub fun download(url: Text, path: Text): Bool
Downloads a file from a given URL and saves it to a specified path using available command-line tools.
It checks for the availability of common command-line tools (curl
, wget
, and aria2c
, in order) and uses the first available tool to perform the download.
If none of the tools are available, the function returns false
.
Getting Started
Installation
Usage
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Documentation
Array
Date
Environment
FileSystem
HTTP
Math
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer