util::which (public)

 util::which prog

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Use environment variable PATH to search for the specified executable program. Replacement for UNIX command "which", avoiding exec. exec which: 3368.445 microseconds per iteration ::util::which: 282.372 microseconds per iteration In addition of being more than 10 time faster than the version via exec, this version is less platform dependent.

Parameters:
prog (required)
name of the program to be located on the search path
Returns:
fully qualified name including path, when specified program is found, or otherwise empty string
Author:
Gustaf Neumann

Testcases:
acs_lang_exec_dependencies, acs_subsite_exec_dependencies, acs_tcl_exec_required_dependencies, acs_tcl_exec_optional_dependencies, caldav_exec_dependencies, file_storage_exec_dependencies
[ show source ]
Show another procedure: