◐ Shell
clean mode source ↗

Implement nt.listvolumes by arihant2math · Pull Request #5730 · RustPython/RustPython

@arihant2math

  • nt.listvolumes
  • nt._path_exists and similar causes massive failures

@youknowone youknowone changed the title More nt implementation nt.listvolumes

Apr 28, 2025

@youknowone

nt._path_exists doesn't look like to be included here.
I will not retrigger CI because nt is not related to ubuntu build

youknowone

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was there any related test for listvolumes?

@arihant2math

was there any related test for listvolumes?

Yes, but it requires a different os function that doesn't exist, so it still fails.

@arihant2math arihant2math changed the title nt.listvolumes Implement nt.listvolumes

Apr 30, 2025

youknowone

#[pyfunction]
fn listvolumes(vm: &VirtualMachine) -> PyResult<PyListRef> {
let mut volumes = vec![];
let mut buffer = [0u16; 257];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is related to constant, is this possible?

let mut buffer = [0u16; 257];
let mut buffer = [0u16; MAX_PATH + 1];

@youknowone