* Mounts the VFS at a specific path prefix. * @param {string} prefix The mount point path * @returns {VirtualFileSystem} The VFS instance for chaining
(prefix)
| 136 | * @returns {VirtualFileSystem} The VFS instance for chaining |
| 137 | */ |
| 138 | mount(prefix) { |
| 139 | if (this[kMounted]) { |
| 140 | throw new ERR_INVALID_STATE('VFS is already mounted'); |
| 141 | } |
| 142 | this[kMountPoint] = resolvePath(prefix); |
| 143 | this[kMounted] = true; |
| 144 | debug('mount %s', this[kMountPoint]); |
| 145 | loadVfsSetup(); |
| 146 | registerVFS(this); |
| 147 | return this; |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Unmounts the VFS. |
no test coverage detected