We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5059cf5 commit ed44365Copy full SHA for ed44365
gio/src/file_info.rs
@@ -7,7 +7,7 @@ use std::{
7
8
use glib::{translate::*, StrV};
9
10
-use crate::{ffi, FileInfo};
+use crate::{ffi, FileAttributeValue, FileInfo};
11
12
impl FileInfo {
13
#[cfg_attr(feature = "v2_62", deprecated)]
@@ -71,4 +71,17 @@ impl FileInfo {
71
});
72
}
73
74
+
75
+ #[doc(alias = "g_file_info_set_attribute")]
76
+ pub fn set_attribute<'a>(&self, attribute: &str, value: impl Into<FileAttributeValue<'a>>) {
77
+ unsafe {
78
+ let value: FileAttributeValue<'a> = value.into();
79
+ ffi::g_file_info_set_attribute(
80
+ self.to_glib_none().0,
81
+ attribute.to_glib_none().0,
82
+ value.type_().into_glib(),
83
+ value.as_ptr(),
84
+ );
85
+ }
86
87
0 commit comments