Download files from the Internet and keep them up-to-date.
The package can be installed through Julia's package manager:
Remote files are declared through the
using RemoteFiles @RemoteFile(JULIA_BINARY, "https://status.julialang.org/download/win64", file="julia-nightly-x64.exe", updates=:daily) # Download the file if it is out-of-date download(JULIA_BINARY) # Check whether the file has been downloaded isfile(JULIA_BINARY) # Get the path path(JULIA_BINARY)
By default the file is downloaded to
Pkg.dir(CURRENT_PACKAGE)/data. This can be customized with the
dir keyword argument to the
RemoteFiles can be grouped together in a
@RemoteFileSet BINARIES "Julia Binaries" begin win = @RemoteFile "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6.0-win64.exe" osx = @RemoteFile "https://julialang-s3.julialang.org/bin/osx/x64/0.6/julia-0.6.0-osx10.7+.dmg" end # Download all of them download(BINARIES)
Note that there is also a function-interface with
RemoteFileSet, see their docstrings.
RemoteFiles.jl will try to download files via the cURL command-line tool by default and automatically fall back to use wget or HTTP.jl if the download fails or the respective binaries are not available.
Continue to the API documentation.