MCPcopy Index your code
hub / github.com/RustPython/RustPython / readlink

Function readlink

crates/vm/src/stdlib/os.rs:604–610  ·  view source on GitHub ↗
(path: OsPath, dir_fd: DirFd<'_, 0>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

602
603 #[pyfunction]
604 fn readlink(path: OsPath, dir_fd: DirFd<'_, 0>, vm: &VirtualMachine) -> PyResult {
605 let mode = path.mode();
606 let [] = dir_fd.0;
607 let path =
608 fs::read_link(&path).map_err(|err| OSErrorBuilder::with_filename(&err, path, vm))?;
609 Ok(mode.process_path(path, vm))
610 }
611
612 #[pyattr]
613 #[pyclass(name)]

Callers

nothing calls this directly

Calls 2

process_pathMethod · 0.80
modeMethod · 0.45

Tested by

no test coverage detected