Apache OpenDAL™ - v0.48.1
    Preparing search index...

    Class Writer

    Writer is designed to write data into a given path in an asynchronous manner.

    Index

    Constructors

    Methods

    • Safety

      &mut self in async napi methods should be marked as unsafe

      Close this writer.

      const writer = await op.writer("path/to/file");
      await writer.write(Buffer.from("hello world"));
      await writer.close();

      Returns Promise<void>

    • Create a writable stream from the underlying writer.

      Parameters

      • Optionaloptions: WritableOptions

      Returns Writable

    • Safety

      &mut self in async napi methods should be marked as unsafe

      Write bytes into this writer.

      const writer = await op.writer("path/to/file");
      await writer.write(Buffer.from("hello world"));
      await writer.close();

      Parameters

      • content: string | Buffer

      Returns Promise<void>