filehandle[Symbol.asyncDispose]()


调用 filehandle.close() 并返回一个在文件句柄关闭时完成的 Promise。

🌐 Calls filehandle.close() and returns a promise that fulfills when the filehandle is closed.

这种方法使文件句柄可以与 await using 一起使用,当作用域结束时,await using 会自动关闭文件。更多信息请参见 MDN 上关于 using 语句的文档

🌐 This method enables the filehandle to be used with await using, which will automatically close the file when the scope exits. For more information, see the MDN documentation on using statements.