MCPcopy Create free account
hub / github.com/angular/angular / get_virtual_entry

Method get_virtual_entry

packages/compiler-cli/preprocessor/ng-analyze/src/fs.rs:432–442  ·  view source on GitHub ↗

Retrieve a cloned VirtualFile entry if virtual files are enabled.

(&self, path: &Path)

Source from the content-addressed store, hash-verified

430
431 /// Retrieve a cloned VirtualFile entry if virtual files are enabled.
432 fn get_virtual_entry(&self, path: &Path) -> Option<VirtualFile> {
433 if !self.has_virtual_files.load(Ordering::Relaxed) {
434 return None;
435 }
436 let files = self.virtual_files.read().unwrap();
437 let res = self.get_virtual_file(path, &files).cloned();
438 if res.is_some() {
439 crate::perf::count(Counter::VirtualFileHits, 1);
440 }
441 res
442 }
443
444 /// Iterate over all virtual file paths, as the caller spelled them.
445 pub fn for_each_virtual_path<F>(&self, mut f: F)

Callers 8

readMethod · 0.80
read_to_stringMethod · 0.80
metadataMethod · 0.80
symlink_metadataMethod · 0.80
read_linkMethod · 0.80
canonicalizeMethod · 0.80

Calls 5

get_virtual_fileMethod · 0.80
loadMethod · 0.65
unwrapMethod · 0.65
readMethod · 0.65
countFunction · 0.50