API
RemoteFiles.RemoteFile
— MethodRemoteFile(uri::URI; kwargs...)
Create a RemoteFile
instance with location url
.
The following keyword arguments are available:
file
: Set a different local file name.dir
: The download directory. Ifdir
is not set RemoteFiles will create a new directorydata
in the current directory, i.e. atpwd()
.updates
(default::never
): Indicates with which frequency the remote file is updated. Possible values are::never
:daily
:monthly
:yearly
:mondays
/:weekly
,:tuesdays
, etc.
retries
(default: 3): How many retries should be attempted.try_backends
(default:true
): Whether to retry with different backends.wait
(default: 5): How many seconds to wait between retries.failed
(default::error
): What to do if the download fails. Either throw an exception (:error
) or display a warning (:warn
).
Note: the difference to @RemoteFile
is that the default directory data
is created in pwd()
as opposed to a under the root of the current package.
RemoteFiles.RemoteFileSet
— MethodRemoteFileSet("Some description",
file1 = RemoteFile(...) # or @RemoteFile ...
file2 = RemoteFile(...)
)
Collect several RemoteFile
s in the RemoteFileSet
with a description.
Base.Filesystem.isfile
— Methodisfile(rfs::RemoteFileSet, file)
Check whether a specific file
contained in rfs
has been downloaded.
Base.Filesystem.isfile
— Methodisfile(rfs::RemoteFileSet)
Check whether all files contained in rfs
have been downloaded.
Base.Filesystem.isfile
— Methodisfile(rf::RemoteFile)
Check whether rf
has been downloaded.
Base.Filesystem.rm
— Methodrm(rfs::RemoteFileSet, file; force=false)
Remove a specific downloaded file
contained in rfs
.
Base.Filesystem.rm
— Methodrm(rfs::RemoteFileSet; force=false)
Remove all downloaded files contained in rfs
.
Base.Filesystem.rm
— Methodrm(rf::RemoteFile; force=false)
Remove the downloaded file rf
.
Base.download
— Methoddownload(rfs::RemoteFileSet;
quiet::Bool=false, verbose::Bool=false, force::Bool=false)
Download all files contained in rfs
.
quiet
: Do not print messages.verbose
: Print all messages.force
: Force download and overwrite existing files.force_update
: Overwrite existing files even if they are equal.
Base.download
— Methoddownload(rf::RemoteFile;
quiet::Bool=false,
verbose::Bool=false,
force::Bool=false,
retries::Int=0)
Download rf
.
quiet
: Do not print messages.verbose
: Print all messages.force
: Force download and overwrite existing files.force_update
: Overwrite existing files even if they are equal.retries
: Override the number of retries inrf
ifretries != 0
FileIO.load
— Methodload(rf::RemoteFile)
Load the contents of a remote file, downloading the file if it has not been done previously, reading the file from disk and trying to infer the format from filename and/or magic bytes in the file via FileIO.jl.
RemoteFiles.files
— Methodfiles(rfs::RemoteFileSet)
Get the (unsorted) list of file identifiers from a RemoteFileSet
.
RemoteFiles.override_backends
— Methodoverride_backends(backends...)
Manually override the auto-detected backends with backends
.
RemoteFiles.path
— Methodpath(rfs::RemoteFileSet, file)
Get the path to a specific downloaded file
contained in rfs
.
RemoteFiles.path
— Methodpath(rf::RemoteFile)
Get the local path of rf
.
RemoteFiles.paths
— Methodpaths(rfs::RemoteFileSet, files...)
Get the paths to specific downloaded files
contained in rfs
.
RemoteFiles.reset_backends
— Methodreset_backends()
Reset backends by re-running auto detection.
[email protected]
— Macro@RemoteFile name url [key=value...]
Assign the RemoteFile
located at url
to the variable name
.
The following keyword arguments are available:
file
: Set a different local file name.dir
: The download directory. Ifdir
is not set RemoteFiles will create a new directorydata
under the root of the current package and save the file there.updates
(default::never
): Indicates with which frequency the remote file is updated. Possible values are::never
:daily
:monthly
:yearly
:mondays
/:weekly
,:tuesdays
, etc.
retries
(default: 3): How many retries should be attempted.try_backends
(default:true
): Whether to retry with different backends.backends
(defaultRemoteFiles.BACKENDS
): Which backends to try.wait
(default: 5): How many seconds to wait between retries.failed
(default::error
): What to do if the download fails. Either throw an exception (:error
) or display a warning (:warn
).
[email protected]
— Macro@RemoteFileSet name description begin
file1 = @RemoteFile ...
file2 = @RemoteFile ...
...
end
Collect several RemoteFile
s in the RemoteFileSet
saved under name
with a description
.