Command.h 496 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/LexicalPath.h>
  8. #include <AK/Optional.h>
  9. #include <AK/String.h>
  10. #include <spawn.h>
  11. namespace Core {
  12. // If the executed command fails, the returned String will be in the null state.
  13. String command(const String& program, const Vector<String>& arguments, Optional<LexicalPath> chdir);
  14. String command(const String& command_string, Optional<LexicalPath> chdir);
  15. }