MCPcopy
hub / github.com/webpack/webpack / getFileHash

Method getFileHash

lib/FileSystemInfo.js:1723–1727  ·  view source on GitHub ↗

* Returns file hash. * @param {string} path file path * @param {(err?: WebpackError | null, hash?: string | null) => void} callback callback function * @returns {void}

(path, callback)

Source from the content-addressed store, hash-verified

1721 * @returns {void}
1722 */
1723 getFileHash(path, callback) {
1724 const cache = this._fileHashes.get(path);
1725 if (cache !== undefined) return callback(null, cache);
1726 this.fileHashQueue.add(path, callback);
1727 }
1728
1729 /**
1730 * Returns context hash.

Callers 2

_readContextHashMethod · 0.95

Calls 3

callbackFunction · 0.50
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected