Skip to content

Introduce BunFile.append or Bun.append #16768

Open
@TomasHubelbauer

Description

@TomasHubelbauer

What is the problem this feature would solve?

With the introduction of BunFile.delete in Bun 1.2, the only remaining I/O method I have to tap to node:fs for is fs.promises.appendFile now. I think it would be really nice to be able to stick to Bun's native APIs for basic I/O.

What is the feature you are proposing to solve the problem?

I would like to propose one of the following:

  • A new BunFile.append method
  • A new Bun.append method with the same signature as Bun.write
  • A new append boolean flag on Bun.write(destination, input, options)'s options

My preference would be the new BunFile.append method.

What alternatives have you considered?

Status quo, it's not so bad, my proposal is primarily motivated by desire for neatness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions