Files
bun.sh/docs/api
Claude Bot 7e73c0dda8 feat: Add Bun.rename() with advanced conflict resolution
Implement Bun.rename() API that extends Node.js fs.promises.rename() with
an optional third parameter for conflict resolution:

- replace (default): Replace destination if it exists
- swap: Atomically swap files/directories (Unix only, falls back on Windows)
- no-replace: Fail if destination already exists

Features:
- Uses atomic operations (renameat, renameat2) for best performance
- Cross-platform support with graceful Windows fallbacks
- Async implementation using WorkPoolTask and proper promise handling
- Comprehensive input validation and error handling
- Full TypeScript definitions with detailed JSDoc
- PathLike support (strings, Buffers, URLs)

Implementation details:
- Added to BunObject.zig with proper async patterns
- Updated C++ bindings and hash tables
- 32 comprehensive tests covering all modes and edge cases
- Complete documentation with usage examples
- Platform-aware behavior documented for Windows limitations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:15:38 +00:00
..
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2024-09-26 13:47:09 -07:00
2025-03-26 20:51:20 -07:00
2025-07-10 00:10:43 -07:00
2025-08-11 18:42:55 -07:00
2025-02-19 20:48:12 -08:00
2025-07-10 00:10:43 -07:00
2023-02-23 17:13:30 -08:00
2025-07-10 00:10:43 -07:00
2025-06-03 03:34:35 -07:00
2025-01-13 02:15:17 -08:00
2025-04-16 23:22:41 -07:00
2025-07-10 00:10:43 -07:00
2024-09-06 13:26:20 -07:00
2025-08-19 23:15:53 -07:00
2025-08-01 16:09:44 -07:00
2025-01-17 22:08:07 -08:00
2025-08-17 17:33:51 -07:00