MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / _readManifest

Method _readManifest

tests/helpers/package-cache.js:288–307  ·  view source on GitHub ↗

* The `_readManifest` method reads the on-disk manifest for the current * cache and returns its value. * * @private * @method _readManifest * @param {String} label The label for the cache. * @param {String} type The type of package cache. * @return {String} The manifest file con

(label, type)

Source from the content-addressed store, hash-verified

286 * @return {String} The manifest file contents on disk.
287 */
288 _readManifest(label, type) {
289 let readManifestDir = this.dirs[label];
290
291 if (!readManifestDir) {
292 return null;
293 }
294
295 let inputPath = path.join(readManifestDir, translate(type, 'manifest'));
296
297 let result = null;
298 try {
299 result = fs.readFileSync(inputPath, 'utf8');
300 } catch (error) {
301 // Swallow non-exceptional errors.
302 if (error.code !== 'ENOENT') {
303 throw error;
304 }
305 }
306 return result;
307 }
308
309 /**
310 * The `_writeManifest` method generates the on-disk folder for the package cache

Callers 4

_removeLinksMethod · 0.95
_restoreLinksMethod · 0.95
_checkManifestMethod · 0.95

Calls 1

translateFunction · 0.85

Tested by

no test coverage detected