"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 formatRestricted ["FileName" ,format,max] a file of a given format and size smaller than max bytesRestricted ["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)
Check if a file exists:
Restrict to a file format:
Restrict to all image files:
Restrict to a given size:
See Also
Interpreter Restricted Failure File
Interpreter Types: CachedFile UploadedFile ImportFormatString ExportFormatString MIMETypeString