pub async fn execute_command_to_file(
executable_path: impl Into<PathBuf>,
args: &[String],
timeout: Duration,
output_path: impl Into<PathBuf>,
) -> Result<ProcessOutput>Expand description
Executes a command and redirects stdout to a file.
§Arguments
executable_path- Path to the executableargs- Arguments to pass to the commandtimeout- Maximum duration to wait for the processoutput_path- Path to the file where stdout will be written
§Errors
Returns an error if the command fails, times out, or cannot be executed