pub struct QueryFileBasicInfo { /* private fields */ }Expand description
An owned, marshalable parameter set for GetFileInformationByHandleEx with FileBasicInfo.
§Example
use std::fs;
use windows_namespace_request_sys::file_basic::QueryFileBasicInfo;
use windows_sys::Win32::Storage::FileSystem::FILE_ATTRIBUTE_DIRECTORY;
let path = std::env::temp_dir().join(format!("wnrs-fb-{}.tmp", std::process::id()));
fs::write(&path, b"example")?;
let basic = QueryFileBasicInfo::new(fs::File::open(&path)?).perform()?;
// The attributes are the call's bits; a file is not a directory.
assert_eq!(basic.file_attributes() & FILE_ATTRIBUTE_DIRECTORY, 0);Implementations§
Source§impl QueryFileBasicInfo
impl QueryFileBasicInfo
Sourcepub fn new(handle: impl Into<SharedHandle>) -> Self
pub fn new(handle: impl Into<SharedHandle>) -> Self
Begins a request against handle, which the request holds as one more holder of it.
Sourcepub fn handle(&self) -> &SharedHandle
pub fn handle(&self) -> &SharedHandle
The handle being queried, shared with its other holders.
Sourcepub fn perform(&self) -> Outcome<FileBasicInfo>
pub fn perform(&self) -> Outcome<FileBasicInfo>
Trait Implementations§
Source§impl Clone for QueryFileBasicInfo
impl Clone for QueryFileBasicInfo
Source§impl Debug for QueryFileBasicInfo
impl Debug for QueryFileBasicInfo
Source§impl Request for QueryFileBasicInfo
impl Request for QueryFileBasicInfo
Source§type Error = Win32Error
type Error = Win32Error
How performing it can fail. Read more
Source§type Output = FileBasicInfo
type Output = FileBasicInfo
What performing the request produces.
Auto Trait Implementations§
impl Freeze for QueryFileBasicInfo
impl RefUnwindSafe for QueryFileBasicInfo
impl Send for QueryFileBasicInfo
impl Sync for QueryFileBasicInfo
impl Unpin for QueryFileBasicInfo
impl UnsafeUnpin for QueryFileBasicInfo
impl UnwindSafe for QueryFileBasicInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more