cacheFile
File log.cacheFile ( String outputFilenameAndPath, File fileToCache ) (professional and enterprise editions only)
Description
Adds a file to the cache. This can be used to add anything to the cache, from a text file to an image that was downloaded, or any other file that would be useful.
Parameters
- outputFilenameAndPath The name of the file in the cache, including any directory it should be placed in
- fileToCache The file that should be cached. This cannot be a directory
Return Value
A File that represents the cached file.
Change Log
Version |
Description |
5.5.29a |
Available in professional and enterprise editions. |
5.5.43a |
Moved from session to log class. |
Examples
Cache a file
// Set the path in the first parameter so it will show up in a subdirectory in the final output
log.cacheFile("images/products/" + dataRecord.get("PRODUCT_NAME") + ".jpg", new File("output/downloadedImage.jpg"));