vfs.unmount()


卸载虚拟文件系统。卸载后,虚拟文件将无法通过 node:fs、require() 或 import 访问。同一个实例可以通过调用 mount() 再次挂载。

🌐 Unmounts the virtual file system. After unmounting, virtual files are no longer reachable through node:fs, require(), or import. The same instance may be mounted again by calling mount().

这个方法是幂等的:在没有挂载的 VFS 上调用 unmount() 不会有任何效果。

🌐 This method is idempotent: calling unmount() on a VFS that is not currently mounted has no effect.