operator >> method

  1. @override
void operator >>(
  1. File file
)

Appends to file. Platform independent. e.g.

$("echo 1") >> File("./temp");

Will append "1" to file "temp". Which is equivlent to

$("echo 1 >> ./temp")();

on MacOs and Linux. But the above will append "1 " to "temp" on windows.

Implementation

@override
void operator >>(io.File file) {
  file.writeAsBytesSync(stdout,
      mode: io.FileMode.writeOnlyAppend, flush: true);
}