public interface DownloadCache extends ExternalResource
DownloadCache
allows tests to download a files and/or directories and optionally caches
them.
Whether, how, and for how long files are cached is implementation-dependent.
Modifier and Type | Method and Description |
---|---|
static DownloadCache |
get()
Returns the configured DownloadCache implementation, or a
LolCache if none is
configured. |
Path |
getOrDownload(String url,
Path targetDir)
Returns either a cached or newly downloaded version of the given file.
|
afterTestFailure, afterTestSuccess, apply, before
Path getOrDownload(String url, Path targetDir) throws IOException
url
- File/directory to downloadtargetDir
- directory to place file inIOException
- if any IO operation failsstatic DownloadCache get()
LolCache
if none is
configured.LolCache
is none is configuredCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.