file_search_in_paths
Description:
public unowned string file_search_in_paths (string progname, string? try_first, string? paths, FileTest file_test_flags, UtilsFileSearchInPathsPredicate predicate) throws Error
Searches for a progname
file in a list of search paths
.
Parameters:
progname |
the helper program name, like "iptables" Must be a non-empty string, without path separator (/). |
try_first |
a custom path to try first before searching. It is silently ignored if it is empty or not an absolute path. |
paths |
a null terminated list of search paths. Can be empty or null, in
which case only |
file_test_flags |
the flags passed to test when searching for |
predicate |
if given, pass the file name to this function for additional checks. This check is performed after the check for |
user_data |
user data for |
Returns:
the full path to the helper, if found, or null if not found. The returned string is not owned by the caller, but later invocations of the function might overwrite it. |