1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

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
parent 01f0ae20b6
commit 91a03bc6ae
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,