Sha256: 54ed0e77db3d7e141e2c0354de6dd0e2fbc3f52181415e83f48079ce5e30bba3
Contents?: true
Size: 491 Bytes
Versions: 36
Compression:
Stored size: 491 Bytes
Contents
use io_lifetimes::AsHandle; use std::{fs, io}; pub(crate) fn is_file_read_write_impl(file: &fs::File) -> io::Result<(bool, bool)> { let handle = file.as_handle(); let access_mode = winx::file::query_access_information(handle)?; let read = access_mode.contains(winx::file::AccessMode::FILE_READ_DATA); let write = access_mode.contains(winx::file::AccessMode::FILE_WRITE_DATA) || access_mode.contains(winx::file::AccessMode::FILE_APPEND_DATA); Ok((read, write)) }
Version data entries
36 entries across 36 versions & 1 rubygems