Please enable JavaScript to view this site.

InterFormNG2 Manual

ng:fileExist(path)

 

The ng:fileExist Xpath function has this format:

 

ng:fileExist(path), where path contains the path to a file, that should be verified.

 

The function returns true, if the file exists and false, if the file does not exist.

 

The function can e.g. be used for verifying, if a file exists before you try to embed it in a PDF file.

 

 

Examples

 

On the Windows platform you can use this expression:

ng:fileExist('C:\temp\testfile.txt')

 

 

On the IBM i you can e.g. use this to verify if an image is found in the IFS with this expression:

ng:fileExist('/IFormNG2/MyImages/CHKPRE.png')

 

ng:fileExist('//QNTC/MyServer/Share/filename.pdf')

 

Related function is ng:resourceExist.