#[non_exhaustive]pub struct ShellItem {
pub class: u8,
pub kind: ShellItemKind,
pub name: Option<String>,
pub long_name: Option<String>,
pub file_size: Option<u32>,
pub modified: Option<i64>,
pub created: Option<i64>,
pub accessed: Option<i64>,
pub mft_entry: Option<u64>,
pub mft_sequence: Option<u16>,
pub guid: Option<String>,
pub raw: Vec<u8>,
}Expand description
One decoded shell item — a single component of an ITEMIDLIST.
Fields are populated on a best-effort, per-class basis; a field that does
not apply to the item’s class, or that was absent/truncated in the bytes,
is None. The raw item bytes (including the cb size prefix) are always
retained in ShellItem::raw so a consumer can re-inspect or surface the
class byte for an ShellItemKind::Unknown item.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.class: u8The raw class-type indicator byte (offset 2 of the item).
kind: ShellItemKindThe decoded class family.
name: Option<String>The item’s short / display name (DOS short name for a file entry, drive string for a volume, GUID display label for a root item).
long_name: Option<String>The long (Unicode) name from the 0xbeef0004 extension block, when the
item is a file entry and the block is present.
file_size: Option<u32>The file size (u32) for a file-entry item.
modified: Option<i64>Last-modified timestamp (Unix epoch seconds, UTC) — the file entry’s FAT date/time.
created: Option<i64>Creation timestamp (Unix epoch seconds, UTC) from the 0xbeef0004
extension block.
accessed: Option<i64>Last-access timestamp (Unix epoch seconds, UTC) from the 0xbeef0004
extension block.
mft_entry: Option<u64>NTFS MFT entry index (48-bit) from the 0xbeef0004 file reference,
when the extension version is high enough to carry it.
mft_sequence: Option<u16>NTFS MFT sequence number (16-bit) from the 0xbeef0004 file reference.
guid: Option<String>Shell-folder GUID for a root item, in canonical upper-case form.
raw: Vec<u8>The full raw bytes of this item, including the 2-byte cb size prefix.