Odisseia 1.21.56
Português do BrasilManual oficial · 1.21.56
Sobre a tradução em inglês

TShell.CaptureOutput#

Controla se a saída padrão e a saída de erro são armazenadas no resultado.

Declaração#

property CaptureOutput: Boolean read write;

Exemplo#

program Example(Config: TConfig);

uses Odisseia.Process;
var Shell: TShell;
begin
  Shell := TShell.Create;
  Shell.Executable := Config.GetString('SHELL_EXECUTABLE');
  Shell.Command := 'echo hello';
  Shell.CaptureOutput := True;
  WriteLn(BoolToStr(Shell.CaptureOutput))
end.

O padrão é True. Quando False, Output, ErrorOutput e seus arrays de bytes ficam vazios.

Voltar para TShell