OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Check if a file exists:

path = File["ExampleData/ocelot.jpg"]

Interpreter["FileName"][path]

Restrict to a file format:

Interpreter[Restricted["FileName","JPEG"]][File[path]]

Restrict to all image files:

Interpreter[Restricted["FileName","Image"]][File[path]]

Restrict to a given size:

Interpreter[Restricted["FileName",Automatic, 300]][File[path]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Interpreter, paclet:ref/Interpreter])  ▪  (RefLink[Restricted, paclet:ref/Restricted])  ▪  (RefLink[Failure, paclet:ref/Failure])  ▪  (RefLink[File, paclet:ref/File])}, {Related Interpreter Types:  (RefLink[CachedFile, paclet:ref/interpreter/CachedFile])  ▪  (RefLink[UploadedFile, paclet:ref/interpreter/UploadedFile])  ▪  (RefLink[ImportFormatString, paclet:ref/interpreter/ImportFormatString])  ▪  (RefLink[ExportFormatString, paclet:ref/interpreter/ExportFormatString])  ▪  (RefLink[MIMETypeString, paclet:ref/interpreter/MIMETypeString])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}})}})