(download-release dir release)
(download-release dir release config)
Get an archive file either from the cache or downloaded from TRUD.
In most circumstances, using get-latest
is more appropriate.
Parameters:
get-releases
.java.nio.file.Path
Get an archive file either from the cache or downloaded from TRUD. In most circumstances, using `get-latest` is more appropriate. Parameters: - cache-dir : cache directory - release : release information from TRUD, as returned by `get-releases`. - config : configuration, including: |- :progress - boolean, to print download progress or not Returns result as a `java.nio.file.Path`
(get-latest config item-identifier)
(get-latest {:keys [api-key cache-dir progress]} item-identifier existing-date)
Returns the latest release of the specified item, if existing is outdated. Currently only uses release date and does not use archive timestamp.
Parameters:
Result is the data from the source TRUD API except that dates are parsed into java LocalDates to simplify sorting and comparison and the following keys are added:
existing-date
) is
outdated.java.io.File
to the downloaded distribution, if an
update is requiredjava.nio.files.Path
to the downloaded
distribution, if an update is required.Returns the latest release of the specified item, if existing is outdated. Currently only uses release date and does not use archive timestamp. Parameters: - config : a configuration map containing: - api-key : your NHS Digital TRUD api key - cache-dir : where to download and cache distributions - progress : whether to print progress or not - item-identifier : the TRUD API item identifier you want. - existing-date : (optional) existing date of this item you have (java.time.LocalDate) Result is the data from the source [TRUD API](https://isd.digital.nhs.uk/trud3/user/guest/group/0/api) except that dates are parsed into java LocalDates to simplify sorting and comparison and the following keys are added: - :needsUpdate? : indicates if your current version (`existing-date`) is outdated. - :archiveFile : a `java.io.File` to the downloaded distribution, if an update is required - :archiveFilePath : a `java.nio.files.Path` to the downloaded distribution, if an update is required.
(get-releases api-key item-identifier)
Returns a sequence of structured metadata about each release of the distribution files. Data are returned as-is from the source API, except that dates are parsed and the item-identifier is included using the key 'itemIdentifier'.
Returns a sequence of structured metadata about each release of the distribution files. Data are returned as-is from the source API, except that dates are parsed and the item-identifier is included using the key 'itemIdentifier'.
Unzip a zip archive to the directory specified. Parameters:
If no out
path is specified, a temporary directory will be created.
The out directory will be created if it doesn't exist.
Unzip a zip archive to the directory specified. Parameters: - in : path of zip file - out : path of the directory to which files will be extracted. If no `out` path is specified, a temporary directory will be created. The out directory will be created if it doesn't exist.
Unzip a zip archive to the directory specified, unzipping nested zip files. Parameters:
If no out
path is specified, a temporary directory will be created.
The out directory will be created if it doesn't exist.
Unzip a zip archive to the directory specified, unzipping nested zip files. Parameters: - in : path of zip file - out : path of the directory to which files will be extracted. If no `out` path is specified, a temporary directory will be created. The out directory will be created if it doesn't exist.
Resolves a query representing files from a nested directory structure, including extracting nested zip files.
A query is a potentially nested vector of strings or paths. ["test.zip" ["nested1.zip"] ["nested2.zip" "file.txt"]]
This will extract the test.zip file, extract the files in both nested1.zip
and nested2.zip and also returns a path for file.txt
from the nested2.zip.
Results will be java.nio.file.Path objects in the same shape as the query. For the example above, four paths will be returned.
Resolves a query representing files from a nested directory structure, including extracting nested zip files. A query is a potentially nested vector of strings or paths. ["test.zip" ["nested1.zip"] ["nested2.zip" "file.txt"]] This will extract the test.zip file, extract the files in both nested1.zip and nested2.zip and also returns a path for `file.txt` from the nested2.zip. Results will be java.nio.file.Path objects in the same shape as the query. For the example above, four paths will be returned.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close