(fd: i32, mode: u32, vm: &VirtualMachine)
| 317 | } |
| 318 | |
| 319 | fn fchmod_impl(fd: i32, mode: u32, vm: &VirtualMachine) -> PyResult<()> { |
| 320 | // Get Windows HANDLE from fd |
| 321 | let borrowed = unsafe { crt_fd::Borrowed::borrow_raw(fd) }; |
| 322 | let handle = crt_fd::as_handle(borrowed).map_err(|e| e.to_pyexception(vm))?; |
| 323 | let hfile = handle.as_raw_handle() as Foundation::HANDLE; |
| 324 | win32_hchmod(hfile, mode, vm) |
| 325 | } |
| 326 | |
| 327 | fn win32_lchmod(path: &OsPath, mode: u32, vm: &VirtualMachine) -> PyResult<()> { |
| 328 | use windows_sys::Win32::Storage::FileSystem::{GetFileAttributesW, SetFileAttributesW}; |
no test coverage detected