* Gets context timestamp. * @param {string} path context path * @param {(err?: WebpackError | null, resolvedContextTimestamp?: ResolvedContextTimestamp) => void} callback callback function * @returns {void}
(path, callback)
| 1655 | * @returns {void} |
| 1656 | */ |
| 1657 | getContextTimestamp(path, callback) { |
| 1658 | const cache = this._contextTimestamps.get(path); |
| 1659 | if (cache !== undefined && !isExistenceOnly(cache)) { |
| 1660 | if (cache === "ignore") return callback(null, "ignore"); |
| 1661 | const fullEntry = |
| 1662 | /** @type {ContextFileSystemInfoEntry | null} */ |
| 1663 | (cache); |
| 1664 | const resolved = getResolvedTimestamp(fullEntry); |
| 1665 | if (resolved !== undefined) return callback(null, resolved); |
| 1666 | return this._resolveContextTimestamp( |
| 1667 | /** @type {ContextFileSystemInfoEntry} */ |
| 1668 | (fullEntry), |
| 1669 | callback |
| 1670 | ); |
| 1671 | } |
| 1672 | this._readFreshContextTimestamp(path, callback); |
| 1673 | } |
| 1674 | |
| 1675 | /** |
| 1676 | * Reads a context timestamp directly from disk, bypassing any cached |
no test coverage detected