MCPcopy Index your code
hub / github.com/nodejs/node / mount

Method mount

lib/internal/vfs/file_system.js:138–148  ·  view source on GitHub ↗

* Mounts the VFS at a specific path prefix. * @param {string} prefix The mount point path * @returns {VirtualFileSystem} The VFS instance for chaining

(prefix)

Source from the content-addressed store, hash-verified

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.

Callers 15

mountedFunction · 0.80
mountedFunction · 0.80
mountedFunction · 0.80
mountedFunction · 0.80

Calls 4

resolvePathFunction · 0.85
loadVfsSetupFunction · 0.85
registerVFSFunction · 0.85
debugFunction · 0.50

Tested by

no test coverage detected