下面的代码将字符串字符串转换为二进制流stream,并管道到grep进程
import 'dart:io';
import 'dart:convert';
main() async {
var grep = await Process.start('grep', ['hello']);
Stream.value(const Utf8Codec().encode(server)).pipe(grep.stdin);
}
下面的代码将字符串字符串转换为二进制流stream,并管道到grep进程
import 'dart:io';
import 'dart:convert';
main() async {
var grep = await Process.start('grep', ['hello']);
Stream.value(const Utf8Codec().encode(server)).pipe(grep.stdin);
}
支付宝
微信