"CachedFile" (Interpreter Type)

A file to be copied in a local directory.


  • "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

Restriction Specifications


  • "CachedFile" yields File["newpath"], where "newpath" is where the file has been copied to.


Basic Examples  (1)

Cache files:

Restrict to a file format:

Restrict to all image files:

Restrict to a given size:

"CachedFile" also works with a CloudObject:

"CachedFile" also works with a URL object: