dir[Symbol.dispose]()
如果目录句柄已打开,则调用 dir.closeSync(),并返回 undefined。
🌐 Calls dir.closeSync() if the directory handle is open, and returns
undefined.
这种方法使该目录可以与 using 一起使用,当作用域退出时,using 会自动关闭该目录。更多信息请参见 MDN 上关于 using 语句的文档。
🌐 This method enables the directory to be used with using, which
will automatically close the directory when the scope exits. For more
information, see the MDN documentation on using statements.