MIAMEX 191: Search for file in System Path

Added June 2018

xcall MIAMEX, MX_SRCHPATH, file, foundpath

MIAMEX function MX_SRCHPATH (191) searchs for a file in the system path.

Parameters

file  (String)  [in]

filename to search for. Wilcards and directory names disallowed.

foundpath  (String)  [out]

returns "" if not found, else the full path.

Comments

The search path is system dependent, but normally includes the current directory, the directory from which the A-Shell executable was loaded, plus all the directories included in the PATH environment variable.

One use of this function would be to check whether a particular external command exists before attempting to launch it via HOSTEX.SBR.

History

2018 June, A-Shell 6.5.1638:  Function added to A-Shell.