mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -171,13 +171,14 @@ await Bun.rename("source.txt", "dest.txt", "no-replace");
|
||||
|
||||
The `conflict` parameter controls behavior when the destination already exists:
|
||||
|
||||
| Mode | Description |
|
||||
| ---- | ----------- |
|
||||
| `"replace"` | Replace destination if it exists (default) |
|
||||
| `"swap"` | Atomically swap the two files (Linux/macOS only, falls back to `"replace"` on Windows) |
|
||||
| `"no-replace"` | Fail with an error if destination exists |
|
||||
| Mode | Description |
|
||||
| -------------- | -------------------------------------------------------------------------------------- |
|
||||
| `"replace"` | Replace destination if it exists (default) |
|
||||
| `"swap"` | Atomically swap the two files (Linux/macOS only, falls back to `"replace"` on Windows) |
|
||||
| `"no-replace"` | Fail with an error if destination exists |
|
||||
|
||||
---
|
||||
|
||||
## Incremental writing with `FileSink`
|
||||
|
||||
Bun provides a native incremental file writing API called `FileSink`. To retrieve a `FileSink` instance from a `BunFile`:
|
||||
|
||||
Reference in New Issue
Block a user