pub_just/
platform_interface.rs

1use super::*;
2
3pub trait PlatformInterface {
4  /// Construct a command equivalent to running the script at `path` with the
5  /// shebang line `shebang`
6  fn make_shebang_command(
7    path: &Path,
8    working_directory: Option<&Path>,
9    shebang: Shebang,
10  ) -> Result<Command, OutputError>;
11
12  /// Set the execute permission on the file pointed to by `path`
13  fn set_execute_permission(path: &Path) -> io::Result<()>;
14
15  /// Extract the signal from a process exit status, if it was terminated by a
16  /// signal
17  fn signal_from_exit_status(exit_status: ExitStatus) -> Option<i32>;
18
19  /// Translate a path from a "native" path to a path the interpreter expects
20  fn convert_native_path(working_directory: &Path, path: &Path) -> FunctionResult;
21}