@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Function writeFile

    • writes binary/buffer data to a file on supported runtimes (i.e. RUNTIME.DENO, RUNTIME.BUN, or RUNTIME.NODE). for unsupported runtimes, an error is thrown.

      Parameters

      • runtime_enum: RUNTIME

        the runtime enum indicating which runtime should be used for writing onto the filesystem.

      • file_path: string | URL

        the destination file path.

      • data: ArrayBufferView

        the byte/buffer data to write to the file.

      • config: Partial<WriteFileConfig> = {}

        provide optional configuration on how the writing should be performed.

      Returns Promise<void>

      an error is thrown if an unsupported runtime uses this function, or if config.create is false, and no pre-existing file resides at the specified file_path.