pub struct MDItem(/* private fields */);Expand description
A wrapper around macOS Metadata Item (MDItem). Provides access to file and directory metadata through the Spotlight metadata framework.
Implementations§
Source§impl MDItem
impl MDItem
Sourcepub fn get_attribute_names(&self) -> Vec<String>
pub fn get_attribute_names(&self) -> Vec<String>
Retrieves all available attribute names for this MDItem.
§Returns
Vec<String>- A vector of attribute name strings
Sourcepub fn get_attribute<T: Sized + ConcreteType>(
&self,
name: &str,
) -> Option<CFRetained<T>>
pub fn get_attribute<T: Sized + ConcreteType>( &self, name: &str, ) -> Option<CFRetained<T>>
Sourcepub fn path(&self) -> Option<PathBuf>
pub fn path(&self) -> Option<PathBuf>
Retrieves the file path of this MDItem.
§Returns
Option<PathBuf>- The file path, or None if not available
Sourcepub fn display_name(&self) -> Option<String>
pub fn display_name(&self) -> Option<String>
Retrieves the display name of this MDItem.
§Returns
Option<String>- The display name, or None if not available
Auto Trait Implementations§
impl Freeze for MDItem
impl RefUnwindSafe for MDItem
impl Send for MDItem
impl Sync for MDItem
impl Unpin for MDItem
impl UnwindSafe for MDItem
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