BlockingWriter is designed to write data into a given path in a blocking manner.

Constructors

Methods

  • Safety

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

    Close this writer.

    Example

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

    Returns void

  • Create a writable stream from the underlying writer.

    Parameters

    • Optional options: WritableOptions

    Returns Writable

  • Safety

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

    Write bytes into this writer.

    Example

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

    Parameters

    • content: string | Buffer

    Returns void

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.