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

Method to_path_or_fd

crates/vm/src/stdlib/nt.rs:453–455  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

451
452 impl PathArg {
453 fn to_path_or_fd(&self, vm: &VirtualMachine) -> Option<OsPathOrFd<'static>> {
454 OsPathOrFd::try_from_object(vm, self.path.clone()).ok()
455 }
456 }
457
458 // File type test constants (PY_IF* constants - internal, not from Windows API)

Callers 6

_path_isdirFunction · 0.80
_path_isfileFunction · 0.80
_path_islinkFunction · 0.80
_path_isjunctionFunction · 0.80
_path_existsFunction · 0.80
_path_lexistsFunction · 0.80

Calls 2

okMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected