启动进程

1877次阅读  |  发布于5年以前

启动进程

Use Process.run() to run a process. The results of the process are returned asynchronously using a ProcessResult object.

import 'dart:io';

main() async {
  // List all files in the current directory in UNIX-like operating systems.
  var results = await Process.run('ls', ['-l']);
  print(results.stdout);
}

Copyright© 2013-2019

京ICP备2023019179号-2