MCPcopy Create free account
hub / github.com/Michael-F-Bryan/include_dir / get_file

Method get_file

include_dir/src/dir.rs:59–61  ·  view source on GitHub ↗

Look up a file by name.

(&self, path: S)

Source from the content-addressed store, hash-verified

57
58 /// Look up a file by name.
59 pub fn get_file<S: AsRef<Path>>(&self, path: S) -> Option<&'a File<'a>> {
60 self.get_entry(path).and_then(DirEntry::as_file)
61 }
62
63 /// Look up a dir by name.
64 pub fn get_dir<S: AsRef<Path>>(&self, path: S) -> Option<&'a Dir<'a>> {

Callers

nothing calls this directly

Calls 1

get_entryMethod · 0.80

Tested by

no test coverage detected