MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / create

Method create

src/fs/dev.rs:34–47  ·  view source on GitHub ↗

Create

(pname: &str)

Source from the content-addressed store, hash-verified

32{
33 // Create
34 pub fn create(pname: &str) -> Option<Self>
35 {
36 let pname = rpath(pname);
37 let dname = crate::fs::dname(&pname);
38 let fname = fname(&pname);
39 if let Some(directory) = Directory::open(dname)
40 {
41 if let Some(directory_entry) = directory.new_dev(fname)
42 {
43 return Some(Device::File(directory_entry.into()))
44 }
45 }
46 None
47 }
48
49
50 // New

Callers

nothing calls this directly

Calls 7

rpathFunction · 0.85
dnameFunction · 0.85
fnameFunction · 0.85
FileClass · 0.85
new_devMethod · 0.80
intoMethod · 0.80
openFunction · 0.70

Tested by

no test coverage detected