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

Function fname

src/fs/mod.rs:226–236  ·  view source on GitHub ↗

File name

(pname: &str)

Source from the content-addressed store, hash-verified

224
225// File name
226pub fn fname(pname: &str) -> &str
227{
228 let n = pname.len();
229 let i = match pname.rfind('/')
230 {
231 Some(i) => i + 1,
232 None => 0,
233 };
234
235 &pname[i..n]
236}
237
238
239// Info

Callers 9

shcompFunction · 0.85
createMethod · 0.85
delMethod · 0.85
openMethod · 0.85
createMethod · 0.85
rmMethod · 0.85
createMethod · 0.85
openMethod · 0.85
openMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected