MCPcopy
hub / github.com/webpack/webpack / getFileTimestamp

Method getFileTimestamp

lib/FileSystemInfo.js:1640–1649  ·  view source on GitHub ↗

* Gets file timestamp. * @param {string} path file path * @param {(err?: WebpackError | null, fileTimestamp?: FileSystemInfoEntry | "ignore" | null) => void} callback callback function * @returns {void}

(path, callback)

Source from the content-addressed store, hash-verified

1638 * @returns {void}
1639 */
1640 getFileTimestamp(path, callback) {
1641 const cache = this._fileTimestamps.get(path);
1642 if (cache !== undefined && !isExistenceOnly(cache)) {
1643 return callback(
1644 null,
1645 /** @type {FileSystemInfoEntry | "ignore" | null} */ (cache)
1646 );
1647 }
1648 this.fileTimestampQueue.add(path, callback);
1649 }
1650
1651 /**
1652 * Gets context timestamp.

Callers 1

Calls 4

isExistenceOnlyFunction · 0.85
callbackFunction · 0.50
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected