4D v16.3

Is picture file

Home

 
4D v16.3
Is picture file

Is picture file 


 

Is picture file ( filePath {; *} ) -> Function result 
Parameter Type   Description
filePath  Text in File pathname
Operator in Validate data
Function result  Boolean in True = filePath designates a picture file; otherwise, False

The Is picture file command tests the file designated by the filePath parameter and returns True if it is a valid picture file. The command returns False if the file is not of the picture type or if it is not found. 

Pass the pathname of the picture file to be tested in the filePath parameter. The path must be expressed with the system syntax. You can pass an absolute pathname or a pathname relative to the database structure file. If you pass an empty string (""), the command returns False. 

If you do not pass the * parameter, the command tests the file by looking for its extension among the list of available codecs. If you want to be able to test files without extensions or to carry out a more thorough verification, pass the * parameter. In this case, the command makes additional tests: it loads and inspects the file header and queries the codecs in order to validate the picture. This syntax slows command execution.

Note: The command returns True for PDF files under Windows and EMF files under Mac OS.



See also 

PICTURE CODEC LIST

 
PROPERTIES 

Product: 4D
Theme: Pictures
Number: 1113

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v12

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)