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

Method filename

crates/vm/src/ospath.rs:259–266  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

257 }
258
259 pub fn filename(&self, vm: &VirtualMachine) -> PyObjectRef {
260 if let Some(ref origin) = self.origin {
261 origin.clone()
262 } else {
263 // Default to string when no origin (e.g., from new_str)
264 OutputMode::String.process_path(self.path.clone(), vm)
265 }
266 }
267
268 /// Get the output mode based on origin type (bytes -> Bytes, otherwise -> String)
269 pub fn mode(&self) -> OutputMode {

Callers 6

get_default_verify_pathsFunction · 0.45
with_filenameMethod · 0.45
symlinkFunction · 0.45
renameFunction · 0.45
linkFunction · 0.45

Calls 3

process_pathMethod · 0.80
cloneMethod · 0.45
to_pyobjectMethod · 0.45

Tested by

no test coverage detected