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

Function ftruncate

crates/vm/src/stdlib/os.rs:2031–2033  ·  view source on GitHub ↗
(fd: crt_fd::Borrowed<'_>, length: crt_fd::Offset)

Source from the content-addressed store, hash-verified

2029
2030 #[pyfunction]
2031 pub fn ftruncate(fd: crt_fd::Borrowed<'_>, length: crt_fd::Offset) -> io::Result<()> {
2032 crt_fd::ftruncate(fd, length)
2033 }
2034
2035 #[pyfunction]
2036 fn truncate(path: PyObjectRef, length: crt_fd::Offset, vm: &VirtualMachine) -> PyResult<()> {

Callers 2

truncateMethod · 0.70
truncateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected