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

Method process_path

crates/vm/src/ospath.rs:198–209  ·  view source on GitHub ↗
(self, path: impl Into<PathBuf>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

196
197impl OutputMode {
198 pub(super) fn process_path(self, path: impl Into<PathBuf>, vm: &VirtualMachine) -> PyObjectRef {
199 fn inner(mode: OutputMode, path: PathBuf, vm: &VirtualMachine) -> PyObjectRef {
200 match mode {
201 OutputMode::String => vm.fsdecode(path).into(),
202 OutputMode::Bytes => vm
203 .ctx
204 .new_bytes(path.into_os_string().into_encoded_bytes())
205 .into(),
206 }
207 }
208 inner(self, path.into(), vm)
209 }
210}
211
212impl OsPath {

Callers 11

filenameMethod · 0.80
_getfinalpathnameFunction · 0.80
_getfullpathnameFunction · 0.80
_getvolumepathnameFunction · 0.80
readlinkFunction · 0.80
listdirFunction · 0.80
readlinkFunction · 0.80
nameMethod · 0.80
pathMethod · 0.80
getcwdFunction · 0.80
getcwdbFunction · 0.80

Calls 1

innerFunction · 0.50

Tested by

no test coverage detected