File Tools
This tools provides a way of downloading and verifying files.
Functions
Section titled “Functions”download (url, location, fileName)
Section titled “download (url, location, fileName)”This function downloads the declared file.
It takes the following parameters:
url: URL of the object you want to download.${resourcePath}is replaced with theRESOURCE_SERVERaddress.location: Download destination without the file namefileName: File Name
It will return true / false dependent on whether the file downloads successfully. Downloads are retried up to 50
times.
If the client is offline, the download is skipped and
trueis returned.
validate (fileObject)
Section titled “validate (fileObject)”This function takes a file object in the following format.
It will resolve:
trueif the checksum matches"pass"if thesha1isNONEand the file exists, or the destination isno path- the
fileObjectif the file is missing or the checksum does not match
createUUID()
Section titled “createUUID()”Returns a random v4 UUID. This is used for session IDs.
