File tree Expand file tree Collapse file tree 3 files changed +33
-23
lines changed Expand file tree Collapse file tree 3 files changed +33
-23
lines changed Original file line number Diff line number Diff line change @@ -806,6 +806,14 @@ status = "generate"
806
806
name = " set_modification_time"
807
807
# use SystemTime
808
808
manual = true
809
+ [[object .function ]]
810
+ name = " get_attribute_stringv"
811
+ # use strv
812
+ manual = true
813
+ [[object .function ]]
814
+ name = " set_attribute_stringv"
815
+ # use strv
816
+ manual = true
809
817
810
818
[[object ]]
811
819
name = " Gio.FilterOutputStream"
Original file line number Diff line number Diff line change @@ -138,17 +138,6 @@ impl FileInfo {
138
138
}
139
139
}
140
140
141
- #[ doc( alias = "g_file_info_get_attribute_stringv" ) ]
142
- #[ doc( alias = "get_attribute_stringv" ) ]
143
- pub fn attribute_stringv ( & self , attribute : & str ) -> Vec < glib:: GString > {
144
- unsafe {
145
- FromGlibPtrContainer :: from_glib_none ( ffi:: g_file_info_get_attribute_stringv (
146
- self . to_glib_none ( ) . 0 ,
147
- attribute. to_glib_none ( ) . 0 ,
148
- ) )
149
- }
150
- }
151
-
152
141
#[ doc( alias = "g_file_info_get_attribute_type" ) ]
153
142
#[ doc( alias = "get_attribute_type" ) ]
154
143
pub fn attribute_type ( & self , attribute : & str ) -> FileAttributeType {
@@ -425,17 +414,6 @@ impl FileInfo {
425
414
}
426
415
}
427
416
428
- #[ doc( alias = "g_file_info_set_attribute_stringv" ) ]
429
- pub fn set_attribute_stringv ( & self , attribute : & str , attr_value : & [ & str ] ) {
430
- unsafe {
431
- ffi:: g_file_info_set_attribute_stringv (
432
- self . to_glib_none ( ) . 0 ,
433
- attribute. to_glib_none ( ) . 0 ,
434
- attr_value. to_glib_none ( ) . 0 ,
435
- ) ;
436
- }
437
- }
438
-
439
417
#[ doc( alias = "g_file_info_set_attribute_uint32" ) ]
440
418
pub fn set_attribute_uint32 ( & self , attribute : & str , attr_value : u32 ) {
441
419
unsafe {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use std::{
5
5
time:: { Duration , SystemTime } ,
6
6
} ;
7
7
8
- use glib:: translate:: * ;
8
+ use glib:: { translate:: * , IntoStrV , StrV } ;
9
9
10
10
use crate :: FileInfo ;
11
11
@@ -47,4 +47,28 @@ impl FileInfo {
47
47
) ;
48
48
}
49
49
}
50
+
51
+ #[ doc( alias = "g_file_info_get_attribute_stringv" ) ]
52
+ #[ doc( alias = "get_attribute_stringv" ) ]
53
+ pub fn attribute_stringv ( & self , attribute : & str ) -> StrV {
54
+ unsafe {
55
+ FromGlibPtrContainer :: from_glib_none ( ffi:: g_file_info_get_attribute_stringv (
56
+ self . to_glib_none ( ) . 0 ,
57
+ attribute. to_glib_none ( ) . 0 ,
58
+ ) )
59
+ }
60
+ }
61
+
62
+ #[ doc( alias = "g_file_info_set_attribute_stringv" ) ]
63
+ pub fn set_attribute_stringv ( & self , attribute : & str , attr_value : impl IntoStrV ) {
64
+ unsafe {
65
+ attr_value. run_with_strv ( |attr_value| {
66
+ ffi:: g_file_info_set_attribute_stringv (
67
+ self . to_glib_none ( ) . 0 ,
68
+ attribute. to_glib_none ( ) . 0 ,
69
+ attr_value. as_ptr ( ) as * mut _ ,
70
+ ) ;
71
+ } ) ;
72
+ }
73
+ }
50
74
}
You can’t perform that action at this time.
0 commit comments