Files
bun.sh/test/js
Claude Bot eb3d38dbde fix(core): make Bun.file() return BunFile instance instead of Blob
Create a separate BunFile class that extends Blob with file-specific
methods (exists, write, unlink, delete, stat, writer, name, lastModified).
This ensures Bun.file().constructor.name returns "BunFile" and plain Blob
instances don't expose non-standard file methods.

Also fixes the File prototype chain so File.prototype properly extends
Blob.prototype instead of being the same object.

Closes #26967

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-12 14:40:49 +00:00
..