"CachedFile" (Interpreter Type)
A file to be copied in a local directory.
Details
- "CachedFile" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "CachedFile" does not require connectivity to the Wolfram Cloud.
- Unlike most interpretation types, "CachedFile" has a side effect: it creates a new file on disk.
- "CachedFile" treats File["file"] and URL["url"] as "file" and "url", respectively.
Allowed Forms
-
File["path"] a path to a local file URL["url"] a URL CloudObject["url"] a cloud object
Restriction Specifications
-
Restricted["CachedFile",format] a file of a given format Restricted["CachedFile",format,max] a file of a given format and size smaller than max bytes Restricted["CachedFile",format,{min,max}] a file of a given format and size between min and max bytes - The bounds min and max can also be expressed as quantities in the appropriate unit (e.g. Quantity[1,"Megabytes"]).
Interpretation
- "CachedFile" yields File["newpath"], where "newpath" is where the file has been copied to.
Examples
Basic Examples (1)
"CachedFile" also works with a CloudObject:
"CachedFile" also works with a URL object: