writable property

WritableStream<Uint8List> get writable

A {@linkcode WritableStream} instance to write the contents of the file. This makes it easy to interoperate with other web streams based APIs.

const items = ["hello", "world"];
const file = await Deno.open("my_file.txt", { write: true });
const encoder = new TextEncoder();
const writer = file.writable.getWriter();
for (const item of items) {
 await writer.write(encoder.encode(item));
}
file.close();

Implementation

_i5.WritableStream<_i9.Uint8List> get writable => _i3.getProperty(
      this,
      'writable',
    );