Real path
(pname: &str)
| 409 | |
| 410 | // Real path |
| 411 | pub fn rpath(pname: &str) -> String |
| 412 | { |
| 413 | if pname.starts_with('/') |
| 414 | { |
| 415 | pname.into() |
| 416 | } |
| 417 | else |
| 418 | { |
| 419 | let dname = crate::sys::proc::directory(); |
| 420 | let sep = if dname.ends_with('/') { "" } else { "/" }; |
| 421 | format!("{}{}{}", dname, sep, pname) |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | |
| 426 | // Write |