Skip to main content

gio/auto/
file_info.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4#![allow(deprecated)]
5
6use crate::{FileAttributeMatcher, FileAttributeStatus, FileAttributeType, FileType, Icon, ffi};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    /// Stores information about a file system object referenced by a [`File`][crate::File].
11    ///
12    /// Functionality for manipulating basic metadata for files. `GFileInfo`
13    /// implements methods for getting information that all files should
14    /// contain, and allows for manipulation of extended attributes.
15    ///
16    /// See the [file attributes](file-attributes.html) document for more
17    /// information on how GIO handles file attributes.
18    ///
19    /// To obtain a `GFileInfo` for a [`File`][crate::File], use
20    /// [`FileExt::query_info()`][crate::prelude::FileExt::query_info()] (or its async variant). To obtain a `GFileInfo`
21    /// for a file input or output stream, use [`FileInputStreamExt::query_info()`][crate::prelude::FileInputStreamExt::query_info()]
22    /// or [`FileOutputStreamExt::query_info()`][crate::prelude::FileOutputStreamExt::query_info()] (or their async variants).
23    ///
24    /// To change the actual attributes of a file, you should then set the
25    /// attribute in the `GFileInfo` and call [`FileExt::set_attributes_from_info()`][crate::prelude::FileExt::set_attributes_from_info()]
26    /// or [`FileExt::set_attributes_async()`][crate::prelude::FileExt::set_attributes_async()] on a `GFile`.
27    ///
28    /// However, not all attributes can be changed in the file. For instance,
29    /// the actual size of a file cannot be changed via [`set_size()`][Self::set_size()].
30    /// You may call [`FileExt::query_settable_attributes()`][crate::prelude::FileExt::query_settable_attributes()] and
31    /// [`FileExt::query_writable_namespaces()`][crate::prelude::FileExt::query_writable_namespaces()] to discover the settable attributes
32    /// of a particular file at runtime.
33    ///
34    /// The direct accessors, such as [`name()`][Self::name()], are slightly more
35    /// optimized than the generic attribute accessors, such as
36    /// [`attribute_byte_string()`][Self::attribute_byte_string()].This optimization will matter
37    /// only if calling the API in a tight loop.
38    ///
39    /// It is an error to call these accessors without specifying their required file
40    /// attributes when creating the `GFileInfo`. Use
41    /// [`has_attribute()`][Self::has_attribute()] or [`list_attributes()`][Self::list_attributes()]
42    /// to check what attributes are specified for a `GFileInfo`.
43    ///
44    /// [`FileAttributeMatcher`][crate::FileAttributeMatcher] allows for searching through a `GFileInfo`
45    /// for attributes.
46    ///
47    /// # Implements
48    ///
49    /// [`trait@glib::ObjectExt`]
50    #[doc(alias = "GFileInfo")]
51    pub struct FileInfo(Object<ffi::GFileInfo, ffi::GFileInfoClass>);
52
53    match fn {
54        type_ => || ffi::g_file_info_get_type(),
55    }
56}
57
58impl FileInfo {
59    /// Creates a new file info structure.
60    ///
61    /// # Returns
62    ///
63    /// a #GFileInfo.
64    #[doc(alias = "g_file_info_new")]
65    pub fn new() -> FileInfo {
66        unsafe { from_glib_full(ffi::g_file_info_new()) }
67    }
68
69    /// Clears the status information from @self.
70    #[doc(alias = "g_file_info_clear_status")]
71    pub fn clear_status(&self) {
72        unsafe {
73            ffi::g_file_info_clear_status(self.to_glib_none().0);
74        }
75    }
76
77    /// First clears all of the [GFileAttribute](file-attributes.html#file-attributes) of
78    /// @dest_info, and then copies all of the file attributes from @self to @dest_info.
79    /// ## `dest_info`
80    /// destination to copy attributes to.
81    #[doc(alias = "g_file_info_copy_into")]
82    pub fn copy_into(&self, dest_info: &FileInfo) {
83        unsafe {
84            ffi::g_file_info_copy_into(self.to_glib_none().0, dest_info.to_glib_none().0);
85        }
86    }
87
88    /// Duplicates a file info structure.
89    ///
90    /// # Returns
91    ///
92    /// a duplicate #GFileInfo of @self.
93    #[doc(alias = "g_file_info_dup")]
94    #[must_use]
95    pub fn dup(&self) -> FileInfo {
96        unsafe { from_glib_full(ffi::g_file_info_dup(self.to_glib_none().0)) }
97    }
98
99    /// Gets the access time of the current @self and returns it as a
100    /// #GDateTime.
101    ///
102    /// It is an error to call this if the #GFileInfo does not contain
103    /// [`FILE_ATTRIBUTE_TIME_ACCESS`][crate::FILE_ATTRIBUTE_TIME_ACCESS]. If [`FILE_ATTRIBUTE_TIME_ACCESS_USEC`][crate::FILE_ATTRIBUTE_TIME_ACCESS_USEC] is
104    /// provided, the resulting #GDateTime will additionally have microsecond
105    /// precision.
106    ///
107    /// If nanosecond precision is needed, [`FILE_ATTRIBUTE_TIME_ACCESS_NSEC`][crate::FILE_ATTRIBUTE_TIME_ACCESS_NSEC] must
108    /// be queried separately using g_file_info_get_attribute_uint32().
109    ///
110    /// # Returns
111    ///
112    /// access time, or [`None`] if unknown
113    #[cfg(feature = "v2_70")]
114    #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))]
115    #[doc(alias = "g_file_info_get_access_date_time")]
116    #[doc(alias = "get_access_date_time")]
117    pub fn access_date_time(&self) -> Option<glib::DateTime> {
118        unsafe { from_glib_full(ffi::g_file_info_get_access_date_time(self.to_glib_none().0)) }
119    }
120
121    /// s not meant to be a machine readable or reversible escaping
122    /// format.
123    ///
124    /// To format file name attributes of type
125    /// [enum@Gio.FileAttributeType.BYTE_STRING] for output as UTF-8, use
126    /// `filename_to_utf8()` instead:
127    /// **⚠️ The following code is in c ⚠️**
128    ///
129    /// ```c
130    /// const char *trash_orig_path_byte_string;
131    /// g_autofree char *trash_orig_path_utf8 = NULL;
132    ///
133    /// trash_orig_path_byte_string = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
134    /// trash_orig_path_utf8 = g_filename_to_utf8 (trash_orig_path_byte_string, -1, NULL, NULL, NULL);
135    /// if (trash_orig_path_utf8 != NULL)
136    ///   g_message ("Some larger UTF-8 string with filename embedded as %s", trash_orig_path_utf8);
137    /// ```
138    /// ## `attribute`
139    /// a file attribute key.
140    ///
141    /// # Returns
142    ///
143    /// t set.
144    ///    When you're done with the string it must be freed with g_free().
145    #[doc(alias = "g_file_info_get_attribute_as_string")]
146    #[doc(alias = "get_attribute_as_string")]
147    pub fn attribute_as_string(&self, attribute: &str) -> Option<glib::GString> {
148        unsafe {
149            from_glib_full(ffi::g_file_info_get_attribute_as_string(
150                self.to_glib_none().0,
151                attribute.to_glib_none().0,
152            ))
153        }
154    }
155
156    /// Gets the value of a boolean attribute. If the attribute does not
157    /// contain a boolean value, [`false`] will be returned.
158    /// ## `attribute`
159    /// a file attribute key.
160    ///
161    /// # Returns
162    ///
163    /// the boolean value contained within the attribute.
164    #[doc(alias = "g_file_info_get_attribute_boolean")]
165    #[doc(alias = "get_attribute_boolean")]
166    pub fn boolean(&self, attribute: &str) -> bool {
167        unsafe {
168            from_glib(ffi::g_file_info_get_attribute_boolean(
169                self.to_glib_none().0,
170                attribute.to_glib_none().0,
171            ))
172        }
173    }
174
175    /// Gets the value of a byte string attribute. If the attribute does
176    /// not contain a byte string, [`None`] will be returned.
177    /// ## `attribute`
178    /// a file attribute key.
179    ///
180    /// # Returns
181    ///
182    /// the contents of the @attribute value as a byte string, or
183    /// [`None`] otherwise.
184    #[doc(alias = "g_file_info_get_attribute_byte_string")]
185    #[doc(alias = "get_attribute_byte_string")]
186    pub fn attribute_byte_string(&self, attribute: &str) -> Option<glib::GString> {
187        unsafe {
188            from_glib_none(ffi::g_file_info_get_attribute_byte_string(
189                self.to_glib_none().0,
190                attribute.to_glib_none().0,
191            ))
192        }
193    }
194
195    //#[doc(alias = "g_file_info_get_attribute_data")]
196    //#[doc(alias = "get_attribute_data")]
197    //pub fn attribute_data(&self, attribute: &str, value_pp: /*Unimplemented*/&mut Basic: Pointer) -> Option<(FileAttributeType, FileAttributeStatus)> {
198    //    unsafe { TODO: call ffi:g_file_info_get_attribute_data() }
199    //}
200
201    /// Gets the value of a byte string attribute as a file path.
202    ///
203    /// If the attribute does not contain a byte string, `NULL` will be returned.
204    ///
205    /// This function is meant to be used by language bindings that have specific
206    /// handling for Unix paths.
207    /// ## `attribute`
208    /// a file attribute key.
209    ///
210    /// # Returns
211    ///
212    /// the contents of the @attribute value as
213    /// a file path, or [`None`] otherwise.
214    #[cfg(feature = "v2_78")]
215    #[cfg_attr(docsrs, doc(cfg(feature = "v2_78")))]
216    #[doc(alias = "g_file_info_get_attribute_file_path")]
217    #[doc(alias = "get_attribute_file_path")]
218    pub fn attribute_file_path(&self, attribute: &str) -> Option<std::path::PathBuf> {
219        unsafe {
220            from_glib_none(ffi::g_file_info_get_attribute_file_path(
221                self.to_glib_none().0,
222                attribute.to_glib_none().0,
223            ))
224        }
225    }
226
227    /// Gets a signed 32-bit integer contained within the attribute. If the
228    /// attribute does not contain a signed 32-bit integer, or is invalid,
229    /// 0 will be returned.
230    /// ## `attribute`
231    /// a file attribute key.
232    ///
233    /// # Returns
234    ///
235    /// a signed 32-bit integer from the attribute.
236    #[doc(alias = "g_file_info_get_attribute_int32")]
237    #[doc(alias = "get_attribute_int32")]
238    pub fn attribute_int32(&self, attribute: &str) -> i32 {
239        unsafe {
240            ffi::g_file_info_get_attribute_int32(self.to_glib_none().0, attribute.to_glib_none().0)
241        }
242    }
243
244    /// Gets a signed 64-bit integer contained within the attribute. If the
245    /// attribute does not contain a signed 64-bit integer, or is invalid,
246    /// 0 will be returned.
247    /// ## `attribute`
248    /// a file attribute key.
249    ///
250    /// # Returns
251    ///
252    /// a signed 64-bit integer from the attribute.
253    #[doc(alias = "g_file_info_get_attribute_int64")]
254    #[doc(alias = "get_attribute_int64")]
255    pub fn attribute_int64(&self, attribute: &str) -> i64 {
256        unsafe {
257            ffi::g_file_info_get_attribute_int64(self.to_glib_none().0, attribute.to_glib_none().0)
258        }
259    }
260
261    /// Gets the value of a #GObject attribute. If the attribute does
262    /// not contain a #GObject, [`None`] will be returned.
263    /// ## `attribute`
264    /// a file attribute key.
265    ///
266    /// # Returns
267    ///
268    /// a #GObject associated with the given @attribute,
269    /// or [`None`] otherwise.
270    #[doc(alias = "g_file_info_get_attribute_object")]
271    #[doc(alias = "get_attribute_object")]
272    pub fn attribute_object(&self, attribute: &str) -> Option<glib::Object> {
273        unsafe {
274            from_glib_none(ffi::g_file_info_get_attribute_object(
275                self.to_glib_none().0,
276                attribute.to_glib_none().0,
277            ))
278        }
279    }
280
281    /// Gets the attribute status for an attribute key.
282    /// ## `attribute`
283    /// a file attribute key
284    ///
285    /// # Returns
286    ///
287    /// a #GFileAttributeStatus for the given @attribute, or
288    ///    [`FileAttributeStatus::Unset`][crate::FileAttributeStatus::Unset] if the key is invalid.
289    #[doc(alias = "g_file_info_get_attribute_status")]
290    #[doc(alias = "get_attribute_status")]
291    pub fn attribute_status(&self, attribute: &str) -> FileAttributeStatus {
292        unsafe {
293            from_glib(ffi::g_file_info_get_attribute_status(
294                self.to_glib_none().0,
295                attribute.to_glib_none().0,
296            ))
297        }
298    }
299
300    /// Gets the value of a string attribute. If the attribute does
301    /// not contain a string, [`None`] will be returned.
302    /// ## `attribute`
303    /// a file attribute key.
304    ///
305    /// # Returns
306    ///
307    /// the contents of the @attribute value as a UTF-8 string,
308    /// or [`None`] otherwise.
309    #[doc(alias = "g_file_info_get_attribute_string")]
310    #[doc(alias = "get_attribute_string")]
311    pub fn attribute_string(&self, attribute: &str) -> Option<glib::GString> {
312        unsafe {
313            from_glib_none(ffi::g_file_info_get_attribute_string(
314                self.to_glib_none().0,
315                attribute.to_glib_none().0,
316            ))
317        }
318    }
319
320    /// Gets the attribute type for an attribute key.
321    /// ## `attribute`
322    /// a file attribute key.
323    ///
324    /// # Returns
325    ///
326    /// a #GFileAttributeType for the given @attribute, or
327    /// [`FileAttributeType::Invalid`][crate::FileAttributeType::Invalid] if the key is not set.
328    #[doc(alias = "g_file_info_get_attribute_type")]
329    #[doc(alias = "get_attribute_type")]
330    pub fn attribute_type(&self, attribute: &str) -> FileAttributeType {
331        unsafe {
332            from_glib(ffi::g_file_info_get_attribute_type(
333                self.to_glib_none().0,
334                attribute.to_glib_none().0,
335            ))
336        }
337    }
338
339    /// Gets an unsigned 32-bit integer contained within the attribute. If the
340    /// attribute does not contain an unsigned 32-bit integer, or is invalid,
341    /// 0 will be returned.
342    /// ## `attribute`
343    /// a file attribute key.
344    ///
345    /// # Returns
346    ///
347    /// an unsigned 32-bit integer from the attribute.
348    #[doc(alias = "g_file_info_get_attribute_uint32")]
349    #[doc(alias = "get_attribute_uint32")]
350    pub fn attribute_uint32(&self, attribute: &str) -> u32 {
351        unsafe {
352            ffi::g_file_info_get_attribute_uint32(self.to_glib_none().0, attribute.to_glib_none().0)
353        }
354    }
355
356    /// Gets a unsigned 64-bit integer contained within the attribute. If the
357    /// attribute does not contain an unsigned 64-bit integer, or is invalid,
358    /// 0 will be returned.
359    /// ## `attribute`
360    /// a file attribute key.
361    ///
362    /// # Returns
363    ///
364    /// a unsigned 64-bit integer from the attribute.
365    #[doc(alias = "g_file_info_get_attribute_uint64")]
366    #[doc(alias = "get_attribute_uint64")]
367    pub fn attribute_uint64(&self, attribute: &str) -> u64 {
368        unsafe {
369            ffi::g_file_info_get_attribute_uint64(self.to_glib_none().0, attribute.to_glib_none().0)
370        }
371    }
372
373    /// Gets the file's content type.
374    ///
375    /// It is an error to call this if the #GFileInfo does not contain
376    /// [`FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE`][crate::FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE].
377    ///
378    /// # Returns
379    ///
380    /// a string containing the file's content type,
381    /// or [`None`] if unknown.
382    #[doc(alias = "g_file_info_get_content_type")]
383    #[doc(alias = "get_content_type")]
384    pub fn content_type(&self) -> Option<glib::GString> {
385        unsafe { from_glib_none(ffi::g_file_info_get_content_type(self.to_glib_none().0)) }
386    }
387
388    /// Gets the creation time of the current @self and returns it as a
389    /// #GDateTime.
390    ///
391    /// It is an error to call this if the #GFileInfo does not contain
392    /// [`FILE_ATTRIBUTE_TIME_CREATED`][crate::FILE_ATTRIBUTE_TIME_CREATED]. If [`FILE_ATTRIBUTE_TIME_CREATED_USEC`][crate::FILE_ATTRIBUTE_TIME_CREATED_USEC] is
393    /// provided, the resulting #GDateTime will additionally have microsecond
394    /// precision.
395    ///
396    /// If nanosecond precision is needed, [`FILE_ATTRIBUTE_TIME_CREATED_NSEC`][crate::FILE_ATTRIBUTE_TIME_CREATED_NSEC] must
397    /// be queried separately using g_file_info_get_attribute_uint32().
398    ///
399    /// # Returns
400    ///
401    /// creation time, or [`None`] if unknown
402    #[cfg(feature = "v2_70")]
403    #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))]
404    #[doc(alias = "g_file_info_get_creation_date_time")]
405    #[doc(alias = "get_creation_date_time")]
406    pub fn creation_date_time(&self) -> Option<glib::DateTime> {
407        unsafe {
408            from_glib_full(ffi::g_file_info_get_creation_date_time(
409                self.to_glib_none().0,
410            ))
411        }
412    }
413
414    /// Returns the #GDateTime representing the deletion date of the file, as
415    /// available in [`FILE_ATTRIBUTE_TRASH_DELETION_DATE`][crate::FILE_ATTRIBUTE_TRASH_DELETION_DATE]. If the
416    /// [`FILE_ATTRIBUTE_TRASH_DELETION_DATE`][crate::FILE_ATTRIBUTE_TRASH_DELETION_DATE] attribute is unset, [`None`] is returned.
417    ///
418    /// # Returns
419    ///
420    /// a #GDateTime, or [`None`].
421    #[doc(alias = "g_file_info_get_deletion_date")]
422    #[doc(alias = "get_deletion_date")]
423    pub fn deletion_date(&self) -> Option<glib::DateTime> {
424        unsafe { from_glib_full(ffi::g_file_info_get_deletion_date(self.to_glib_none().0)) }
425    }
426
427    /// Gets a display name for a file. This is guaranteed to always be set.
428    ///
429    /// It is an error to call this if the #GFileInfo does not contain
430    /// [`FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME`][crate::FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME].
431    ///
432    /// # Returns
433    ///
434    /// a string containing the display name.
435    #[doc(alias = "g_file_info_get_display_name")]
436    #[doc(alias = "get_display_name")]
437    pub fn display_name(&self) -> glib::GString {
438        unsafe { from_glib_none(ffi::g_file_info_get_display_name(self.to_glib_none().0)) }
439    }
440
441    /// Gets the edit name for a file.
442    ///
443    /// It is an error to call this if the #GFileInfo does not contain
444    /// [`FILE_ATTRIBUTE_STANDARD_EDIT_NAME`][crate::FILE_ATTRIBUTE_STANDARD_EDIT_NAME].
445    ///
446    /// # Returns
447    ///
448    /// a string containing the edit name.
449    #[doc(alias = "g_file_info_get_edit_name")]
450    #[doc(alias = "get_edit_name")]
451    pub fn edit_name(&self) -> glib::GString {
452        unsafe { from_glib_none(ffi::g_file_info_get_edit_name(self.to_glib_none().0)) }
453    }
454
455    /// Gets the [entity tag][`File`][crate::File]#entity-tags] for a given
456    /// #GFileInfo. See [`FILE_ATTRIBUTE_ETAG_VALUE`][crate::FILE_ATTRIBUTE_ETAG_VALUE].
457    ///
458    /// It is an error to call this if the #GFileInfo does not contain
459    /// [`FILE_ATTRIBUTE_ETAG_VALUE`][crate::FILE_ATTRIBUTE_ETAG_VALUE].
460    ///
461    /// # Returns
462    ///
463    /// a string containing the value of the "etag:value" attribute.
464    #[doc(alias = "g_file_info_get_etag")]
465    #[doc(alias = "get_etag")]
466    pub fn etag(&self) -> Option<glib::GString> {
467        unsafe { from_glib_none(ffi::g_file_info_get_etag(self.to_glib_none().0)) }
468    }
469
470    /// Gets a file's type (whether it is a regular file, symlink, etc).
471    /// This is different from the file's content type, see g_file_info_get_content_type().
472    ///
473    /// It is an error to call this if the #GFileInfo does not contain
474    /// [`FILE_ATTRIBUTE_STANDARD_TYPE`][crate::FILE_ATTRIBUTE_STANDARD_TYPE].
475    ///
476    /// # Returns
477    ///
478    /// a #GFileType for the given file.
479    #[doc(alias = "g_file_info_get_file_type")]
480    #[doc(alias = "get_file_type")]
481    pub fn file_type(&self) -> FileType {
482        unsafe { from_glib(ffi::g_file_info_get_file_type(self.to_glib_none().0)) }
483    }
484
485    /// Gets the icon for a file.
486    ///
487    /// It is an error to call this if the #GFileInfo does not contain
488    /// [`FILE_ATTRIBUTE_STANDARD_ICON`][crate::FILE_ATTRIBUTE_STANDARD_ICON].
489    ///
490    /// # Returns
491    ///
492    /// #GIcon for the given @self.
493    #[doc(alias = "g_file_info_get_icon")]
494    #[doc(alias = "get_icon")]
495    pub fn icon(&self) -> Option<Icon> {
496        unsafe { from_glib_none(ffi::g_file_info_get_icon(self.to_glib_none().0)) }
497    }
498
499    /// Checks if a file is a backup file.
500    ///
501    /// The exact semantics of what constitutes a backup file are
502    /// backend-specific. For local files, a file is considered a backup
503    /// if its name ends with `~` and it is a regular file. This follows
504    /// the POSIX convention used by text editors such as Emacs.
505    ///
506    /// It is an error to call this if the #GFileInfo does not contain
507    /// [`FILE_ATTRIBUTE_STANDARD_IS_BACKUP`][crate::FILE_ATTRIBUTE_STANDARD_IS_BACKUP].
508    ///
509    /// # Returns
510    ///
511    /// [`true`] if file is a backup file, [`false`] otherwise.
512    #[doc(alias = "g_file_info_get_is_backup")]
513    #[doc(alias = "get_is_backup")]
514    pub fn is_backup(&self) -> bool {
515        unsafe { from_glib(ffi::g_file_info_get_is_backup(self.to_glib_none().0)) }
516    }
517
518    /// Checks if a file is hidden.
519    ///
520    /// It is an error to call this if the #GFileInfo does not contain
521    /// [`FILE_ATTRIBUTE_STANDARD_IS_HIDDEN`][crate::FILE_ATTRIBUTE_STANDARD_IS_HIDDEN].
522    ///
523    /// # Returns
524    ///
525    /// [`true`] if the file is a hidden file, [`false`] otherwise.
526    #[doc(alias = "g_file_info_get_is_hidden")]
527    #[doc(alias = "get_is_hidden")]
528    pub fn is_hidden(&self) -> bool {
529        unsafe { from_glib(ffi::g_file_info_get_is_hidden(self.to_glib_none().0)) }
530    }
531
532    /// Checks if a file is a symlink.
533    ///
534    /// It is an error to call this if the #GFileInfo does not contain
535    /// [`FILE_ATTRIBUTE_STANDARD_IS_SYMLINK`][crate::FILE_ATTRIBUTE_STANDARD_IS_SYMLINK].
536    ///
537    /// # Returns
538    ///
539    /// [`true`] if the given @self is a symlink.
540    #[doc(alias = "g_file_info_get_is_symlink")]
541    #[doc(alias = "get_is_symlink")]
542    pub fn is_symlink(&self) -> bool {
543        unsafe { from_glib(ffi::g_file_info_get_is_symlink(self.to_glib_none().0)) }
544    }
545
546    /// Gets the modification time of the current @self and returns it as a
547    /// #GDateTime.
548    ///
549    /// It is an error to call this if the #GFileInfo does not contain
550    /// [`FILE_ATTRIBUTE_TIME_MODIFIED`][crate::FILE_ATTRIBUTE_TIME_MODIFIED]. If [`FILE_ATTRIBUTE_TIME_MODIFIED_USEC`][crate::FILE_ATTRIBUTE_TIME_MODIFIED_USEC] is
551    /// provided, the resulting #GDateTime will additionally have microsecond
552    /// precision.
553    ///
554    /// If nanosecond precision is needed, [`FILE_ATTRIBUTE_TIME_MODIFIED_NSEC`][crate::FILE_ATTRIBUTE_TIME_MODIFIED_NSEC] must
555    /// be queried separately using g_file_info_get_attribute_uint32().
556    ///
557    /// # Returns
558    ///
559    /// modification time, or [`None`] if unknown
560    #[cfg(feature = "v2_62")]
561    #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))]
562    #[doc(alias = "g_file_info_get_modification_date_time")]
563    #[doc(alias = "get_modification_date_time")]
564    pub fn modification_date_time(&self) -> Option<glib::DateTime> {
565        unsafe {
566            from_glib_full(ffi::g_file_info_get_modification_date_time(
567                self.to_glib_none().0,
568            ))
569        }
570    }
571
572    /// Gets the name for a file. This is guaranteed to always be set.
573    ///
574    /// It is an error to call this if the #GFileInfo does not contain
575    /// [`FILE_ATTRIBUTE_STANDARD_NAME`][crate::FILE_ATTRIBUTE_STANDARD_NAME].
576    ///
577    /// # Returns
578    ///
579    /// a string containing the file name.
580    #[doc(alias = "g_file_info_get_name")]
581    #[doc(alias = "get_name")]
582    pub fn name(&self) -> std::path::PathBuf {
583        unsafe { from_glib_none(ffi::g_file_info_get_name(self.to_glib_none().0)) }
584    }
585
586    /// Gets the file's size (in bytes). The size is retrieved through the value of
587    /// the [`FILE_ATTRIBUTE_STANDARD_SIZE`][crate::FILE_ATTRIBUTE_STANDARD_SIZE] attribute and is converted
588    /// from #guint64 to #goffset before returning the result.
589    ///
590    /// It is an error to call this if the #GFileInfo does not contain
591    /// [`FILE_ATTRIBUTE_STANDARD_SIZE`][crate::FILE_ATTRIBUTE_STANDARD_SIZE].
592    ///
593    /// # Returns
594    ///
595    /// a #goffset containing the file's size (in bytes).
596    #[doc(alias = "g_file_info_get_size")]
597    #[doc(alias = "get_size")]
598    pub fn size(&self) -> i64 {
599        unsafe { ffi::g_file_info_get_size(self.to_glib_none().0) }
600    }
601
602    /// Gets the value of the sort_order attribute from the #GFileInfo.
603    /// See [`FILE_ATTRIBUTE_STANDARD_SORT_ORDER`][crate::FILE_ATTRIBUTE_STANDARD_SORT_ORDER].
604    ///
605    /// It is an error to call this if the #GFileInfo does not contain
606    /// [`FILE_ATTRIBUTE_STANDARD_SORT_ORDER`][crate::FILE_ATTRIBUTE_STANDARD_SORT_ORDER].
607    ///
608    /// # Returns
609    ///
610    /// a #gint32 containing the value of the "standard::sort_order" attribute.
611    #[doc(alias = "g_file_info_get_sort_order")]
612    #[doc(alias = "get_sort_order")]
613    pub fn sort_order(&self) -> i32 {
614        unsafe { ffi::g_file_info_get_sort_order(self.to_glib_none().0) }
615    }
616
617    /// Gets the symbolic icon for a file.
618    ///
619    /// It is an error to call this if the #GFileInfo does not contain
620    /// [`FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON`][crate::FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON].
621    ///
622    /// # Returns
623    ///
624    /// #GIcon for the given @self.
625    #[doc(alias = "g_file_info_get_symbolic_icon")]
626    #[doc(alias = "get_symbolic_icon")]
627    pub fn symbolic_icon(&self) -> Option<Icon> {
628        unsafe { from_glib_none(ffi::g_file_info_get_symbolic_icon(self.to_glib_none().0)) }
629    }
630
631    /// Gets the symlink target for a given #GFileInfo.
632    ///
633    /// It is an error to call this if the #GFileInfo does not contain
634    /// [`FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET`][crate::FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET].
635    ///
636    /// # Returns
637    ///
638    /// a string containing the symlink target.
639    #[doc(alias = "g_file_info_get_symlink_target")]
640    #[doc(alias = "get_symlink_target")]
641    pub fn symlink_target(&self) -> Option<std::path::PathBuf> {
642        unsafe { from_glib_none(ffi::g_file_info_get_symlink_target(self.to_glib_none().0)) }
643    }
644
645    /// Checks if a file info structure has an attribute named @attribute.
646    /// ## `attribute`
647    /// a file attribute key.
648    ///
649    /// # Returns
650    ///
651    /// [`true`] if @self has an attribute named @attribute,
652    ///     [`false`] otherwise.
653    #[doc(alias = "g_file_info_has_attribute")]
654    pub fn has_attribute(&self, attribute: &str) -> bool {
655        unsafe {
656            from_glib(ffi::g_file_info_has_attribute(
657                self.to_glib_none().0,
658                attribute.to_glib_none().0,
659            ))
660        }
661    }
662
663    /// Checks if a file info structure has an attribute in the
664    /// specified @name_space.
665    /// ## `name_space`
666    /// a file attribute namespace.
667    ///
668    /// # Returns
669    ///
670    /// [`true`] if @self has an attribute in @name_space,
671    ///     [`false`] otherwise.
672    #[doc(alias = "g_file_info_has_namespace")]
673    pub fn has_namespace(&self, name_space: &str) -> bool {
674        unsafe {
675            from_glib(ffi::g_file_info_has_namespace(
676                self.to_glib_none().0,
677                name_space.to_glib_none().0,
678            ))
679        }
680    }
681
682    /// Lists the file info structure's attributes.
683    /// ## `name_space`
684    /// a file attribute key's namespace, or [`None`] to list
685    ///   all attributes.
686    ///
687    /// # Returns
688    ///
689    /// a
690    /// null-terminated array of strings of all of the possible attribute
691    /// types for the given @name_space, or [`None`] on error.
692    #[doc(alias = "g_file_info_list_attributes")]
693    pub fn list_attributes(&self, name_space: Option<&str>) -> Vec<glib::GString> {
694        unsafe {
695            FromGlibPtrContainer::from_glib_full(ffi::g_file_info_list_attributes(
696                self.to_glib_none().0,
697                name_space.to_glib_none().0,
698            ))
699        }
700    }
701
702    /// Removes all cases of @attribute from @self if it exists.
703    /// ## `attribute`
704    /// a file attribute key.
705    #[doc(alias = "g_file_info_remove_attribute")]
706    pub fn remove_attribute(&self, attribute: &str) {
707        unsafe {
708            ffi::g_file_info_remove_attribute(self.to_glib_none().0, attribute.to_glib_none().0);
709        }
710    }
711
712    /// Sets the [`FILE_ATTRIBUTE_TIME_ACCESS`][crate::FILE_ATTRIBUTE_TIME_ACCESS] and
713    /// [`FILE_ATTRIBUTE_TIME_ACCESS_USEC`][crate::FILE_ATTRIBUTE_TIME_ACCESS_USEC] attributes in the file info to the
714    /// given date/time value.
715    ///
716    /// [`FILE_ATTRIBUTE_TIME_ACCESS_NSEC`][crate::FILE_ATTRIBUTE_TIME_ACCESS_NSEC] will be cleared.
717    /// ## `atime`
718    /// a #GDateTime.
719    #[cfg(feature = "v2_70")]
720    #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))]
721    #[doc(alias = "g_file_info_set_access_date_time")]
722    pub fn set_access_date_time(&self, atime: &glib::DateTime) {
723        unsafe {
724            ffi::g_file_info_set_access_date_time(self.to_glib_none().0, atime.to_glib_none().0);
725        }
726    }
727
728    //#[doc(alias = "g_file_info_set_attribute")]
729    //pub fn set_attribute(&self, attribute: &str, type_: FileAttributeType, value_p: /*Unimplemented*/Basic: Pointer) {
730    //    unsafe { TODO: call ffi:g_file_info_set_attribute() }
731    //}
732
733    /// Sets the @attribute to contain the given @attr_value,
734    /// if possible.
735    /// ## `attribute`
736    /// a file attribute key.
737    /// ## `attr_value`
738    /// a boolean value.
739    #[doc(alias = "g_file_info_set_attribute_boolean")]
740    pub fn set_attribute_boolean(&self, attribute: &str, attr_value: bool) {
741        unsafe {
742            ffi::g_file_info_set_attribute_boolean(
743                self.to_glib_none().0,
744                attribute.to_glib_none().0,
745                attr_value.into_glib(),
746            );
747        }
748    }
749
750    /// Sets the @attribute to contain the given @attr_value,
751    /// if possible.
752    /// ## `attribute`
753    /// a file attribute key.
754    /// ## `attr_value`
755    /// a byte string.
756    #[doc(alias = "g_file_info_set_attribute_byte_string")]
757    pub fn set_attribute_byte_string(&self, attribute: &str, attr_value: &str) {
758        unsafe {
759            ffi::g_file_info_set_attribute_byte_string(
760                self.to_glib_none().0,
761                attribute.to_glib_none().0,
762                attr_value.to_glib_none().0,
763            );
764        }
765    }
766
767    /// Sets the @attribute to contain the given @attr_value,
768    /// if possible.
769    ///
770    /// This function is meant to be used by language bindings that have specific
771    /// handling for Unix paths.
772    /// ## `attribute`
773    /// a file attribute key.
774    /// ## `attr_value`
775    /// a file path.
776    #[cfg(feature = "v2_78")]
777    #[cfg_attr(docsrs, doc(cfg(feature = "v2_78")))]
778    #[doc(alias = "g_file_info_set_attribute_file_path")]
779    pub fn set_attribute_file_path(
780        &self,
781        attribute: &str,
782        attr_value: impl AsRef<std::path::Path>,
783    ) {
784        unsafe {
785            ffi::g_file_info_set_attribute_file_path(
786                self.to_glib_none().0,
787                attribute.to_glib_none().0,
788                attr_value.as_ref().to_glib_none().0,
789            );
790        }
791    }
792
793    /// Sets the @attribute to contain the given @attr_value,
794    /// if possible.
795    /// ## `attribute`
796    /// a file attribute key.
797    /// ## `attr_value`
798    /// a signed 32-bit integer
799    #[doc(alias = "g_file_info_set_attribute_int32")]
800    pub fn set_attribute_int32(&self, attribute: &str, attr_value: i32) {
801        unsafe {
802            ffi::g_file_info_set_attribute_int32(
803                self.to_glib_none().0,
804                attribute.to_glib_none().0,
805                attr_value,
806            );
807        }
808    }
809
810    /// Sets the @attribute to contain the given @attr_value,
811    /// if possible.
812    /// ## `attribute`
813    /// attribute name to set.
814    /// ## `attr_value`
815    /// int64 value to set attribute to.
816    #[doc(alias = "g_file_info_set_attribute_int64")]
817    pub fn set_attribute_int64(&self, attribute: &str, attr_value: i64) {
818        unsafe {
819            ffi::g_file_info_set_attribute_int64(
820                self.to_glib_none().0,
821                attribute.to_glib_none().0,
822                attr_value,
823            );
824        }
825    }
826
827    /// Sets @mask on @self to match specific attribute types.
828    /// ## `mask`
829    /// a #GFileAttributeMatcher.
830    #[doc(alias = "g_file_info_set_attribute_mask")]
831    pub fn set_attribute_mask(&self, mask: &FileAttributeMatcher) {
832        unsafe {
833            ffi::g_file_info_set_attribute_mask(self.to_glib_none().0, mask.to_glib_none().0);
834        }
835    }
836
837    /// Sets the @attribute to contain the given @attr_value,
838    /// if possible.
839    /// ## `attribute`
840    /// a file attribute key.
841    /// ## `attr_value`
842    /// a #GObject.
843    #[doc(alias = "g_file_info_set_attribute_object")]
844    pub fn set_attribute_object(&self, attribute: &str, attr_value: &impl IsA<glib::Object>) {
845        unsafe {
846            ffi::g_file_info_set_attribute_object(
847                self.to_glib_none().0,
848                attribute.to_glib_none().0,
849                attr_value.as_ref().to_glib_none().0,
850            );
851        }
852    }
853
854    /// Sets the attribute status for an attribute key. This is only
855    /// needed by external code that implement g_file_set_attributes_from_info()
856    /// or similar functions.
857    ///
858    /// The attribute must exist in @self for this to work. Otherwise [`false`]
859    /// is returned and @self is unchanged.
860    /// ## `attribute`
861    /// a file attribute key
862    /// ## `status`
863    /// a #GFileAttributeStatus
864    ///
865    /// # Returns
866    ///
867    /// [`true`] if the status was changed, [`false`] if the key was not set.
868    #[doc(alias = "g_file_info_set_attribute_status")]
869    pub fn set_attribute_status(&self, attribute: &str, status: FileAttributeStatus) -> bool {
870        unsafe {
871            from_glib(ffi::g_file_info_set_attribute_status(
872                self.to_glib_none().0,
873                attribute.to_glib_none().0,
874                status.into_glib(),
875            ))
876        }
877    }
878
879    /// Sets the @attribute to contain the given @attr_value,
880    /// if possible.
881    /// ## `attribute`
882    /// a file attribute key.
883    /// ## `attr_value`
884    /// a UTF-8 string.
885    #[doc(alias = "g_file_info_set_attribute_string")]
886    pub fn set_attribute_string(&self, attribute: &str, attr_value: &str) {
887        unsafe {
888            ffi::g_file_info_set_attribute_string(
889                self.to_glib_none().0,
890                attribute.to_glib_none().0,
891                attr_value.to_glib_none().0,
892            );
893        }
894    }
895
896    /// Sets the @attribute to contain the given @attr_value,
897    /// if possible.
898    /// ## `attribute`
899    /// a file attribute key.
900    /// ## `attr_value`
901    /// an unsigned 32-bit integer.
902    #[doc(alias = "g_file_info_set_attribute_uint32")]
903    pub fn set_attribute_uint32(&self, attribute: &str, attr_value: u32) {
904        unsafe {
905            ffi::g_file_info_set_attribute_uint32(
906                self.to_glib_none().0,
907                attribute.to_glib_none().0,
908                attr_value,
909            );
910        }
911    }
912
913    /// Sets the @attribute to contain the given @attr_value,
914    /// if possible.
915    /// ## `attribute`
916    /// a file attribute key.
917    /// ## `attr_value`
918    /// an unsigned 64-bit integer.
919    #[doc(alias = "g_file_info_set_attribute_uint64")]
920    pub fn set_attribute_uint64(&self, attribute: &str, attr_value: u64) {
921        unsafe {
922            ffi::g_file_info_set_attribute_uint64(
923                self.to_glib_none().0,
924                attribute.to_glib_none().0,
925                attr_value,
926            );
927        }
928    }
929
930    /// Sets the content type attribute for a given #GFileInfo.
931    /// See [`FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE`][crate::FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE].
932    /// ## `content_type`
933    /// a [content type](content-types.html#content-types).
934    #[doc(alias = "g_file_info_set_content_type")]
935    pub fn set_content_type(&self, content_type: &str) {
936        unsafe {
937            ffi::g_file_info_set_content_type(self.to_glib_none().0, content_type.to_glib_none().0);
938        }
939    }
940
941    /// Sets the [`FILE_ATTRIBUTE_TIME_CREATED`][crate::FILE_ATTRIBUTE_TIME_CREATED] and
942    /// [`FILE_ATTRIBUTE_TIME_CREATED_USEC`][crate::FILE_ATTRIBUTE_TIME_CREATED_USEC] attributes in the file info to the
943    /// given date/time value.
944    ///
945    /// [`FILE_ATTRIBUTE_TIME_CREATED_NSEC`][crate::FILE_ATTRIBUTE_TIME_CREATED_NSEC] will be cleared.
946    /// ## `creation_time`
947    /// a #GDateTime.
948    #[cfg(feature = "v2_70")]
949    #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))]
950    #[doc(alias = "g_file_info_set_creation_date_time")]
951    pub fn set_creation_date_time(&self, creation_time: &glib::DateTime) {
952        unsafe {
953            ffi::g_file_info_set_creation_date_time(
954                self.to_glib_none().0,
955                creation_time.to_glib_none().0,
956            );
957        }
958    }
959
960    /// Sets the display name for the current #GFileInfo.
961    /// See [`FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME`][crate::FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME].
962    /// ## `display_name`
963    /// a string containing a display name.
964    #[doc(alias = "g_file_info_set_display_name")]
965    pub fn set_display_name(&self, display_name: &str) {
966        unsafe {
967            ffi::g_file_info_set_display_name(self.to_glib_none().0, display_name.to_glib_none().0);
968        }
969    }
970
971    /// Sets the edit name for the current file.
972    /// See [`FILE_ATTRIBUTE_STANDARD_EDIT_NAME`][crate::FILE_ATTRIBUTE_STANDARD_EDIT_NAME].
973    /// ## `edit_name`
974    /// a string containing an edit name.
975    #[doc(alias = "g_file_info_set_edit_name")]
976    pub fn set_edit_name(&self, edit_name: &str) {
977        unsafe {
978            ffi::g_file_info_set_edit_name(self.to_glib_none().0, edit_name.to_glib_none().0);
979        }
980    }
981
982    /// Sets the file type in a #GFileInfo to @type_.
983    /// See [`FILE_ATTRIBUTE_STANDARD_TYPE`][crate::FILE_ATTRIBUTE_STANDARD_TYPE].
984    /// ## `type_`
985    /// a #GFileType.
986    #[doc(alias = "g_file_info_set_file_type")]
987    pub fn set_file_type(&self, type_: FileType) {
988        unsafe {
989            ffi::g_file_info_set_file_type(self.to_glib_none().0, type_.into_glib());
990        }
991    }
992
993    /// Sets the icon for a given #GFileInfo.
994    /// See [`FILE_ATTRIBUTE_STANDARD_ICON`][crate::FILE_ATTRIBUTE_STANDARD_ICON].
995    /// ## `icon`
996    /// a #GIcon.
997    #[doc(alias = "g_file_info_set_icon")]
998    pub fn set_icon(&self, icon: &impl IsA<Icon>) {
999        unsafe {
1000            ffi::g_file_info_set_icon(self.to_glib_none().0, icon.as_ref().to_glib_none().0);
1001        }
1002    }
1003
1004    /// Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden.
1005    /// See [`FILE_ATTRIBUTE_STANDARD_IS_HIDDEN`][crate::FILE_ATTRIBUTE_STANDARD_IS_HIDDEN].
1006    /// ## `is_hidden`
1007    /// a #gboolean.
1008    #[doc(alias = "g_file_info_set_is_hidden")]
1009    pub fn set_is_hidden(&self, is_hidden: bool) {
1010        unsafe {
1011            ffi::g_file_info_set_is_hidden(self.to_glib_none().0, is_hidden.into_glib());
1012        }
1013    }
1014
1015    /// Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
1016    /// See [`FILE_ATTRIBUTE_STANDARD_IS_SYMLINK`][crate::FILE_ATTRIBUTE_STANDARD_IS_SYMLINK].
1017    /// ## `is_symlink`
1018    /// a #gboolean.
1019    #[doc(alias = "g_file_info_set_is_symlink")]
1020    pub fn set_is_symlink(&self, is_symlink: bool) {
1021        unsafe {
1022            ffi::g_file_info_set_is_symlink(self.to_glib_none().0, is_symlink.into_glib());
1023        }
1024    }
1025
1026    /// Sets the [`FILE_ATTRIBUTE_TIME_MODIFIED`][crate::FILE_ATTRIBUTE_TIME_MODIFIED] and
1027    /// [`FILE_ATTRIBUTE_TIME_MODIFIED_USEC`][crate::FILE_ATTRIBUTE_TIME_MODIFIED_USEC] attributes in the file info to the
1028    /// given date/time value.
1029    ///
1030    /// [`FILE_ATTRIBUTE_TIME_MODIFIED_NSEC`][crate::FILE_ATTRIBUTE_TIME_MODIFIED_NSEC] will be cleared.
1031    /// ## `mtime`
1032    /// a #GDateTime.
1033    #[cfg(feature = "v2_62")]
1034    #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))]
1035    #[doc(alias = "g_file_info_set_modification_date_time")]
1036    pub fn set_modification_date_time(&self, mtime: &glib::DateTime) {
1037        unsafe {
1038            ffi::g_file_info_set_modification_date_time(
1039                self.to_glib_none().0,
1040                mtime.to_glib_none().0,
1041            );
1042        }
1043    }
1044
1045    /// Sets the name attribute for the current #GFileInfo.
1046    /// See [`FILE_ATTRIBUTE_STANDARD_NAME`][crate::FILE_ATTRIBUTE_STANDARD_NAME].
1047    /// ## `name`
1048    /// a string containing a name.
1049    #[doc(alias = "g_file_info_set_name")]
1050    pub fn set_name(&self, name: impl AsRef<std::path::Path>) {
1051        unsafe {
1052            ffi::g_file_info_set_name(self.to_glib_none().0, name.as_ref().to_glib_none().0);
1053        }
1054    }
1055
1056    /// Sets the [`FILE_ATTRIBUTE_STANDARD_SIZE`][crate::FILE_ATTRIBUTE_STANDARD_SIZE] attribute in the file info
1057    /// to the given size.
1058    /// ## `size`
1059    /// a #goffset containing the file's size.
1060    #[doc(alias = "g_file_info_set_size")]
1061    pub fn set_size(&self, size: i64) {
1062        unsafe {
1063            ffi::g_file_info_set_size(self.to_glib_none().0, size);
1064        }
1065    }
1066
1067    /// Sets the sort order attribute in the file info structure. See
1068    /// [`FILE_ATTRIBUTE_STANDARD_SORT_ORDER`][crate::FILE_ATTRIBUTE_STANDARD_SORT_ORDER].
1069    /// ## `sort_order`
1070    /// a sort order integer.
1071    #[doc(alias = "g_file_info_set_sort_order")]
1072    pub fn set_sort_order(&self, sort_order: i32) {
1073        unsafe {
1074            ffi::g_file_info_set_sort_order(self.to_glib_none().0, sort_order);
1075        }
1076    }
1077
1078    /// Sets the symbolic icon for a given #GFileInfo.
1079    /// See [`FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON`][crate::FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON].
1080    /// ## `icon`
1081    /// a #GIcon.
1082    #[doc(alias = "g_file_info_set_symbolic_icon")]
1083    pub fn set_symbolic_icon(&self, icon: &impl IsA<Icon>) {
1084        unsafe {
1085            ffi::g_file_info_set_symbolic_icon(
1086                self.to_glib_none().0,
1087                icon.as_ref().to_glib_none().0,
1088            );
1089        }
1090    }
1091
1092    /// Sets the [`FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET`][crate::FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET] attribute in the file info
1093    /// to the given symlink target.
1094    /// ## `symlink_target`
1095    /// a static string containing a path to a symlink target.
1096    #[doc(alias = "g_file_info_set_symlink_target")]
1097    pub fn set_symlink_target(&self, symlink_target: impl AsRef<std::path::Path>) {
1098        unsafe {
1099            ffi::g_file_info_set_symlink_target(
1100                self.to_glib_none().0,
1101                symlink_target.as_ref().to_glib_none().0,
1102            );
1103        }
1104    }
1105
1106    /// Unsets a mask set by g_file_info_set_attribute_mask(), if one
1107    /// is set.
1108    #[doc(alias = "g_file_info_unset_attribute_mask")]
1109    pub fn unset_attribute_mask(&self) {
1110        unsafe {
1111            ffi::g_file_info_unset_attribute_mask(self.to_glib_none().0);
1112        }
1113    }
1114}
1115
1116impl Default for FileInfo {
1117    fn default() -> Self {
1118        Self::new()
1119    }
1120}