LibCore: Add function for searching a file in $PATH

This extracts the logic of searching for a file in $PATH from
System::exec to a separate function.
This commit is contained in:
Itamar 2022-07-16 16:55:44 +03:00 committed by Andreas Kling
commit 91a03bc6ae
Notes: sideshowbarker 2024-07-17 08:42:05 +09:00
2 changed files with 21 additions and 21 deletions

View file

@ -160,6 +160,7 @@ ErrorOr<Array<int, 2>> pipe2(int flags);
#ifndef AK_OS_ANDROID
ErrorOr<void> adjtime(const struct timeval* delta, struct timeval* old_delta);
#endif
ErrorOr<String> find_file_in_path(StringView filename);
enum class SearchInPath {
No,
Yes,