Page tree
Skip to end of metadata
Go to start of metadata

This API searches a list of directories for a given file. The first directory in the list containing a file of the given name is returned.

Parameters

  1. Name (String) - File name to search for.
  2. Directory List (Array/optional)  – The list of directories to search. If not specified, the pathlist value from the configuration file is used.

Return Value

A String containing the name of the directory where the file was found.

Exception Handling

An Error instance will be thrown if the file is not found.

Example

Find IFS file.
var found = pjs.findIFSFile("echo", ["/usr/bin", "/QOpenSys/usr/bin"]); 
console.log(found);