"FileName" (Interpreter Type)
"FileName" (Interpreter Type)
A file that exists on disk.
Details
- "FileName" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "FileName" does not require connectivity to the Wolfram Cloud.
- Interpreter["FileName"][File["name"]] is equivalent to Interpreter["FileName"]["name"].
Allowed Forms
- A path to an existing file, either wrapped in File or not.
Restriction Specifications
-
Restricted["FileName",format] a file of a given format Restricted["FileName",format,max] a file of a given format and size smaller than max bytes Restricted["FileName",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
- "FileName" yields a File object.
Examples
Basic Examples (1)
path = File["ExampleData/ocelot.jpg"]Interpreter["FileName"][path]Interpreter[Restricted["FileName", "JPEG"]][path]Interpreter[Restricted["FileName", "Image"]][path]Interpreter[Restricted["FileName", Automatic, 300]][path]See Also
Interpreter Restricted Failure File
Interpreter Types: CachedFile UploadedFile ImportFormatString ExportFormatString MIMETypeString
Related Guides
History
Introduced in 2014 (10.0)