Skip to content

Commit 303648a

Browse files
committed
Add gio::File subclass
Signed-off-by: fbrouille <[email protected]>
1 parent 3ce3935 commit 303648a

File tree

5 files changed

+5590
-3
lines changed

5 files changed

+5590
-3
lines changed

gio/src/file_attribute_value.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,14 @@ impl FileAttributeValue<'_> {
7676
pub(crate) fn as_ptr(&self) -> glib::ffi::gpointer {
7777
self.0.as_ptr()
7878
}
79+
80+
pub(crate) fn for_pointer(type_: FileAttributeType, value_p: *mut std::ffi::c_void) -> Self {
81+
Self(FileAttributeValueInner::Pointer(type_, value_p))
82+
}
7983
}
8084

8185
#[derive(Debug)]
8286
pub(crate) enum FileAttributeValueInner<'a> {
83-
#[allow(dead_code)] // TODO remove this allow attribute when Pointer will be used by this crate
8487
Pointer(FileAttributeType, glib::ffi::gpointer),
8588
String(<&'a str as ToGlibPtr<'a, *mut libc::c_char>>::Storage),
8689
ByteString(&'a CStr),

0 commit comments

Comments
 (0)