好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

获取进程的退出状态码

Use Process.start() to start a process to run an executable. This function returns a new process that you can use to interact with the original process. You can use this returned process to obtain the exit code from executing the original process.

 import 'dart:io';

main() async {
  var process = await Process.start('ls', ['-l']);
  // Get the exit code from the new process.
  var exitCode = await process.exitCode;
  print('exit code: $exitCode');
} 

查看更多关于获取进程的退出状态码的详细内容...

  阅读:74次

上一篇: 创建一个文件

下一篇:Dart语法-整体概述