pub struct FileInformationClass(/* private fields */);Expand description
Which information the query asks for.
A newtype over FILE_INFO_BY_HANDLE_CLASS rather than an enum, because
Windows defines classes this crate has never heard of and refusing them
would narrow the entry. The named constants are the five the audit found;
any other class reaches Windows unaltered through from_raw.
§Example
use windows_namespace_request_sys::query::FileInformationClass;
use windows_sys::Win32::Storage::FileSystem::{FileBasicInfo, FileStandardInfo};
assert_eq!(FileInformationClass::BASIC.as_raw(), FileBasicInfo);
// A class with no named constant here is still expressible.
let standard = FileInformationClass::from_raw(FileStandardInfo);
assert_eq!(standard.as_raw(), FileStandardInfo);Implementations§
Source§impl FileInformationClass
impl FileInformationClass
Sourcepub const CASE_SENSITIVE: Self
pub const CASE_SENSITIVE: Self
FileCaseSensitiveInfo: whether the directory is case-sensitive. A pure
read.
Sourcepub const ID_EXTD_DIRECTORY: Self
pub const ID_EXTD_DIRECTORY: Self
FileIdExtdDirectoryInfo: the next batch of directory entries.
Advances the enumeration cursor, which lives in the file object and is therefore shared with every duplicate of the handle.
Sourcepub const ID_EXTD_DIRECTORY_RESTART: Self
pub const ID_EXTD_DIRECTORY_RESTART: Self
FileIdExtdDirectoryRestartInfo: the first batch, restarting the
enumeration.
Resets the enumeration cursor, with the same sharing consequence.
Sourcepub const fn from_raw(class: FILE_INFO_BY_HANDLE_CLASS) -> Self
pub const fn from_raw(class: FILE_INFO_BY_HANDLE_CLASS) -> Self
Wraps a raw FILE_INFO_BY_HANDLE_CLASS.
Sourcepub const fn moves_enumeration_cursor(self) -> bool
pub const fn moves_enumeration_cursor(self) -> bool
Whether this class mutates the handle’s shared enumeration cursor.
True only for the two directory-enumeration classes. Every other class is a pure read that composes freely with an enumeration in progress, measured rather than assumed.
An unrecognised class reports false, because this answers “is this one
of the two known cursor-moving classes”, not “is this provably safe”.
§Example
use windows_namespace_request_sys::query::FileInformationClass;
assert!(FileInformationClass::ID_EXTD_DIRECTORY.moves_enumeration_cursor());
assert!(FileInformationClass::ID_EXTD_DIRECTORY_RESTART.moves_enumeration_cursor());
// Interleaving one of these with an enumeration is safe: measured, not
// reasoned from the object model.
assert!(!FileInformationClass::BASIC.moves_enumeration_cursor());
assert!(!FileInformationClass::ID.moves_enumeration_cursor());Trait Implementations§
Source§impl Clone for FileInformationClass
impl Clone for FileInformationClass
Source§fn clone(&self) -> FileInformationClass
fn clone(&self) -> FileInformationClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more