v0.2.1 c0399be

gfile.go RawHistoryFolder

1// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gio
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/glib"
12	"github.com/bnema/puregotk/v4/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// An interface for writing VFS file handles.
17type FileIface struct {
18	_ structs.HostLayout
19
20	GIface uintptr
21
22	xDup uintptr
23
24	xHash uintptr
25
26	xEqual uintptr
27
28	xIsNative uintptr
29
30	xHasUriScheme uintptr
31
32	xGetUriScheme uintptr
33
34	xGetBasename uintptr
35
36	xGetPath uintptr
37
38	xGetUri uintptr
39
40	xGetParseName uintptr
41
42	xGetParent uintptr
43
44	xPrefixMatches uintptr
45
46	xGetRelativePath uintptr
47
48	xResolveRelativePath uintptr
49
50	xGetChildForDisplayName uintptr
51
52	xEnumerateChildren uintptr
53
54	xEnumerateChildrenAsync uintptr
55
56	xEnumerateChildrenFinish uintptr
57
58	xQueryInfo uintptr
59
60	xQueryInfoAsync uintptr
61
62	xQueryInfoFinish uintptr
63
64	xQueryFilesystemInfo uintptr
65
66	xQueryFilesystemInfoAsync uintptr
67
68	xQueryFilesystemInfoFinish uintptr
69
70	xFindEnclosingMount uintptr
71
72	xFindEnclosingMountAsync uintptr
73
74	xFindEnclosingMountFinish uintptr
75
76	xSetDisplayName uintptr
77
78	xSetDisplayNameAsync uintptr
79
80	xSetDisplayNameFinish uintptr
81
82	xQuerySettableAttributes uintptr
83
84	xQuerySettableAttributesAsync uintptr
85
86	xQuerySettableAttributesFinish uintptr
87
88	xQueryWritableNamespaces uintptr
89
90	xQueryWritableNamespacesAsync uintptr
91
92	xQueryWritableNamespacesFinish uintptr
93
94	xSetAttribute uintptr
95
96	xSetAttributesFromInfo uintptr
97
98	xSetAttributesAsync uintptr
99
100	xSetAttributesFinish uintptr
101
102	xReadFn uintptr
103
104	xReadAsync uintptr
105
106	xReadFinish uintptr
107
108	xAppendTo uintptr
109
110	xAppendToAsync uintptr
111
112	xAppendToFinish uintptr
113
114	xCreate uintptr
115
116	xCreateAsync uintptr
117
118	xCreateFinish uintptr
119
120	xReplace uintptr
121
122	xReplaceAsync uintptr
123
124	xReplaceFinish uintptr
125
126	xDeleteFile uintptr
127
128	xDeleteFileAsync uintptr
129
130	xDeleteFileFinish uintptr
131
132	xTrash uintptr
133
134	xTrashAsync uintptr
135
136	xTrashFinish uintptr
137
138	xMakeDirectory uintptr
139
140	xMakeDirectoryAsync uintptr
141
142	xMakeDirectoryFinish uintptr
143
144	xMakeSymbolicLink uintptr
145
146	xMakeSymbolicLinkAsync uintptr
147
148	xMakeSymbolicLinkFinish uintptr
149
150	xCopy uintptr
151
152	xCopyAsync uintptr
153
154	xCopyFinish uintptr
155
156	xMove uintptr
157
158	xMoveAsync uintptr
159
160	xMoveFinish uintptr
161
162	xMountMountable uintptr
163
164	xMountMountableFinish uintptr
165
166	xUnmountMountable uintptr
167
168	xUnmountMountableFinish uintptr
169
170	xEjectMountable uintptr
171
172	xEjectMountableFinish uintptr
173
174	xMountEnclosingVolume uintptr
175
176	xMountEnclosingVolumeFinish uintptr
177
178	xMonitorDir uintptr
179
180	xMonitorFile uintptr
181
182	xOpenReadwrite uintptr
183
184	xOpenReadwriteAsync uintptr
185
186	xOpenReadwriteFinish uintptr
187
188	xCreateReadwrite uintptr
189
190	xCreateReadwriteAsync uintptr
191
192	xCreateReadwriteFinish uintptr
193
194	xReplaceReadwrite uintptr
195
196	xReplaceReadwriteAsync uintptr
197
198	xReplaceReadwriteFinish uintptr
199
200	xStartMountable uintptr
201
202	xStartMountableFinish uintptr
203
204	xStopMountable uintptr
205
206	xStopMountableFinish uintptr
207
208	SupportsThreadContexts bool
209
210	xUnmountMountableWithOperation uintptr
211
212	xUnmountMountableWithOperationFinish uintptr
213
214	xEjectMountableWithOperation uintptr
215
216	xEjectMountableWithOperationFinish uintptr
217
218	xPollMountable uintptr
219
220	xPollMountableFinish uintptr
221
222	xMeasureDiskUsage uintptr
223
224	xMeasureDiskUsageAsync uintptr
225
226	xMeasureDiskUsageFinish uintptr
227
228	xQueryExists uintptr
229}
230
231func (x *FileIface) GoPointer() uintptr {
232	return uintptr(unsafe.Pointer(x))
233}
234
235// OverrideDup sets the "dup" callback function.
236// Duplicates a #GFile.
237func (x *FileIface) OverrideDup(cb func(File) *FileBase) {
238	if cb == nil {
239		x.xDup = 0
240	} else {
241		x.xDup = purego.NewCallback(func(FileVarp uintptr) uintptr {
242			ret := cb(&FileBase{Ptr: FileVarp})
243			if ret == nil {
244				return 0
245			}
246			return ret.GoPointer()
247		})
248	}
249}
250
251// GetDup gets the "dup" callback function.
252// Duplicates a #GFile.
253func (x *FileIface) GetDup() func(File) *FileBase {
254	if x.xDup == 0 {
255		return nil
256	}
257	var rawCallback func(FileVarp uintptr) uintptr
258	purego.RegisterFunc(&rawCallback, x.xDup)
259	return func(FileVar File) *FileBase {
260		rawRet := rawCallback(FileVar.GoPointer())
261		if rawRet == 0 {
262			return nil
263		}
264		ret := &FileBase{}
265		ret.Ptr = rawRet
266		return ret
267	}
268}
269
270// OverrideHash sets the "hash" callback function.
271// Creates a hash of a #GFile.
272func (x *FileIface) OverrideHash(cb func(File) uint) {
273	if cb == nil {
274		x.xHash = 0
275	} else {
276		x.xHash = purego.NewCallback(func(FileVarp uintptr) uint {
277			return cb(&FileBase{Ptr: FileVarp})
278		})
279	}
280}
281
282// GetHash gets the "hash" callback function.
283// Creates a hash of a #GFile.
284func (x *FileIface) GetHash() func(File) uint {
285	if x.xHash == 0 {
286		return nil
287	}
288	var rawCallback func(FileVarp uintptr) uint
289	purego.RegisterFunc(&rawCallback, x.xHash)
290	return func(FileVar File) uint {
291		return rawCallback(FileVar.GoPointer())
292	}
293}
294
295// OverrideEqual sets the "equal" callback function.
296// Checks equality of two given #GFiles.
297func (x *FileIface) OverrideEqual(cb func(File, File) bool) {
298	if cb == nil {
299		x.xEqual = 0
300	} else {
301		x.xEqual = purego.NewCallback(func(File1Varp uintptr, File2Varp uintptr) bool {
302			return cb(&FileBase{Ptr: File1Varp}, &FileBase{Ptr: File2Varp})
303		})
304	}
305}
306
307// GetEqual gets the "equal" callback function.
308// Checks equality of two given #GFiles.
309func (x *FileIface) GetEqual() func(File, File) bool {
310	if x.xEqual == 0 {
311		return nil
312	}
313	var rawCallback func(File1Varp uintptr, File2Varp uintptr) bool
314	purego.RegisterFunc(&rawCallback, x.xEqual)
315	return func(File1Var File, File2Var File) bool {
316		return rawCallback(File1Var.GoPointer(), File2Var.GoPointer())
317	}
318}
319
320// OverrideIsNative sets the "is_native" callback function.
321// Checks to see if a file is native to the system.
322func (x *FileIface) OverrideIsNative(cb func(File) bool) {
323	if cb == nil {
324		x.xIsNative = 0
325	} else {
326		x.xIsNative = purego.NewCallback(func(FileVarp uintptr) bool {
327			return cb(&FileBase{Ptr: FileVarp})
328		})
329	}
330}
331
332// GetIsNative gets the "is_native" callback function.
333// Checks to see if a file is native to the system.
334func (x *FileIface) GetIsNative() func(File) bool {
335	if x.xIsNative == 0 {
336		return nil
337	}
338	var rawCallback func(FileVarp uintptr) bool
339	purego.RegisterFunc(&rawCallback, x.xIsNative)
340	return func(FileVar File) bool {
341		return rawCallback(FileVar.GoPointer())
342	}
343}
344
345// OverrideHasUriScheme sets the "has_uri_scheme" callback function.
346// Checks to see if a #GFile has a given URI scheme.
347func (x *FileIface) OverrideHasUriScheme(cb func(File, string) bool) {
348	if cb == nil {
349		x.xHasUriScheme = 0
350	} else {
351		x.xHasUriScheme = purego.NewCallback(func(FileVarp uintptr, UriSchemeVarp string) bool {
352			return cb(&FileBase{Ptr: FileVarp}, UriSchemeVarp)
353		})
354	}
355}
356
357// GetHasUriScheme gets the "has_uri_scheme" callback function.
358// Checks to see if a #GFile has a given URI scheme.
359func (x *FileIface) GetHasUriScheme() func(File, string) bool {
360	if x.xHasUriScheme == 0 {
361		return nil
362	}
363	var rawCallback func(FileVarp uintptr, UriSchemeVarp string) bool
364	purego.RegisterFunc(&rawCallback, x.xHasUriScheme)
365	return func(FileVar File, UriSchemeVar string) bool {
366		return rawCallback(FileVar.GoPointer(), UriSchemeVar)
367	}
368}
369
370// OverrideGetUriScheme sets the "get_uri_scheme" callback function.
371// Gets the URI scheme for a #GFile.
372func (x *FileIface) OverrideGetUriScheme(cb func(File) string) {
373	if cb == nil {
374		x.xGetUriScheme = 0
375	} else {
376		x.xGetUriScheme = purego.NewCallback(func(FileVarp uintptr) string {
377			return cb(&FileBase{Ptr: FileVarp})
378		})
379	}
380}
381
382// GetGetUriScheme gets the "get_uri_scheme" callback function.
383// Gets the URI scheme for a #GFile.
384func (x *FileIface) GetGetUriScheme() func(File) string {
385	if x.xGetUriScheme == 0 {
386		return nil
387	}
388	var rawCallback func(FileVarp uintptr) string
389	purego.RegisterFunc(&rawCallback, x.xGetUriScheme)
390	return func(FileVar File) string {
391		return rawCallback(FileVar.GoPointer())
392	}
393}
394
395// OverrideGetBasename sets the "get_basename" callback function.
396// Gets the basename for a given #GFile.
397func (x *FileIface) OverrideGetBasename(cb func(File) string) {
398	if cb == nil {
399		x.xGetBasename = 0
400	} else {
401		x.xGetBasename = purego.NewCallback(func(FileVarp uintptr) string {
402			return cb(&FileBase{Ptr: FileVarp})
403		})
404	}
405}
406
407// GetGetBasename gets the "get_basename" callback function.
408// Gets the basename for a given #GFile.
409func (x *FileIface) GetGetBasename() func(File) string {
410	if x.xGetBasename == 0 {
411		return nil
412	}
413	var rawCallback func(FileVarp uintptr) string
414	purego.RegisterFunc(&rawCallback, x.xGetBasename)
415	return func(FileVar File) string {
416		return rawCallback(FileVar.GoPointer())
417	}
418}
419
420// OverrideGetPath sets the "get_path" callback function.
421// Gets the current path within a #GFile.
422func (x *FileIface) OverrideGetPath(cb func(File) string) {
423	if cb == nil {
424		x.xGetPath = 0
425	} else {
426		x.xGetPath = purego.NewCallback(func(FileVarp uintptr) string {
427			return cb(&FileBase{Ptr: FileVarp})
428		})
429	}
430}
431
432// GetGetPath gets the "get_path" callback function.
433// Gets the current path within a #GFile.
434func (x *FileIface) GetGetPath() func(File) string {
435	if x.xGetPath == 0 {
436		return nil
437	}
438	var rawCallback func(FileVarp uintptr) string
439	purego.RegisterFunc(&rawCallback, x.xGetPath)
440	return func(FileVar File) string {
441		return rawCallback(FileVar.GoPointer())
442	}
443}
444
445// OverrideGetUri sets the "get_uri" callback function.
446// Gets a URI for the path within a #GFile.
447func (x *FileIface) OverrideGetUri(cb func(File) string) {
448	if cb == nil {
449		x.xGetUri = 0
450	} else {
451		x.xGetUri = purego.NewCallback(func(FileVarp uintptr) string {
452			return cb(&FileBase{Ptr: FileVarp})
453		})
454	}
455}
456
457// GetGetUri gets the "get_uri" callback function.
458// Gets a URI for the path within a #GFile.
459func (x *FileIface) GetGetUri() func(File) string {
460	if x.xGetUri == 0 {
461		return nil
462	}
463	var rawCallback func(FileVarp uintptr) string
464	purego.RegisterFunc(&rawCallback, x.xGetUri)
465	return func(FileVar File) string {
466		return rawCallback(FileVar.GoPointer())
467	}
468}
469
470// OverrideGetParseName sets the "get_parse_name" callback function.
471// Gets the parsed name for the #GFile.
472func (x *FileIface) OverrideGetParseName(cb func(File) string) {
473	if cb == nil {
474		x.xGetParseName = 0
475	} else {
476		x.xGetParseName = purego.NewCallback(func(FileVarp uintptr) string {
477			return cb(&FileBase{Ptr: FileVarp})
478		})
479	}
480}
481
482// GetGetParseName gets the "get_parse_name" callback function.
483// Gets the parsed name for the #GFile.
484func (x *FileIface) GetGetParseName() func(File) string {
485	if x.xGetParseName == 0 {
486		return nil
487	}
488	var rawCallback func(FileVarp uintptr) string
489	purego.RegisterFunc(&rawCallback, x.xGetParseName)
490	return func(FileVar File) string {
491		return rawCallback(FileVar.GoPointer())
492	}
493}
494
495// OverrideGetParent sets the "get_parent" callback function.
496// Gets the parent directory for the #GFile.
497func (x *FileIface) OverrideGetParent(cb func(File) *FileBase) {
498	if cb == nil {
499		x.xGetParent = 0
500	} else {
501		x.xGetParent = purego.NewCallback(func(FileVarp uintptr) uintptr {
502			ret := cb(&FileBase{Ptr: FileVarp})
503			if ret == nil {
504				return 0
505			}
506			return ret.GoPointer()
507		})
508	}
509}
510
511// GetGetParent gets the "get_parent" callback function.
512// Gets the parent directory for the #GFile.
513func (x *FileIface) GetGetParent() func(File) *FileBase {
514	if x.xGetParent == 0 {
515		return nil
516	}
517	var rawCallback func(FileVarp uintptr) uintptr
518	purego.RegisterFunc(&rawCallback, x.xGetParent)
519	return func(FileVar File) *FileBase {
520		rawRet := rawCallback(FileVar.GoPointer())
521		if rawRet == 0 {
522			return nil
523		}
524		ret := &FileBase{}
525		ret.Ptr = rawRet
526		return ret
527	}
528}
529
530// OverridePrefixMatches sets the "prefix_matches" callback function.
531// Checks whether a #GFile contains a specified file.
532func (x *FileIface) OverridePrefixMatches(cb func(File, File) bool) {
533	if cb == nil {
534		x.xPrefixMatches = 0
535	} else {
536		x.xPrefixMatches = purego.NewCallback(func(PrefixVarp uintptr, FileVarp uintptr) bool {
537			return cb(&FileBase{Ptr: PrefixVarp}, &FileBase{Ptr: FileVarp})
538		})
539	}
540}
541
542// GetPrefixMatches gets the "prefix_matches" callback function.
543// Checks whether a #GFile contains a specified file.
544func (x *FileIface) GetPrefixMatches() func(File, File) bool {
545	if x.xPrefixMatches == 0 {
546		return nil
547	}
548	var rawCallback func(PrefixVarp uintptr, FileVarp uintptr) bool
549	purego.RegisterFunc(&rawCallback, x.xPrefixMatches)
550	return func(PrefixVar File, FileVar File) bool {
551		return rawCallback(PrefixVar.GoPointer(), FileVar.GoPointer())
552	}
553}
554
555// OverrideGetRelativePath sets the "get_relative_path" callback function.
556// Gets the path for a #GFile relative to a given path.
557func (x *FileIface) OverrideGetRelativePath(cb func(File, File) string) {
558	if cb == nil {
559		x.xGetRelativePath = 0
560	} else {
561		x.xGetRelativePath = purego.NewCallback(func(ParentVarp uintptr, DescendantVarp uintptr) string {
562			return cb(&FileBase{Ptr: ParentVarp}, &FileBase{Ptr: DescendantVarp})
563		})
564	}
565}
566
567// GetGetRelativePath gets the "get_relative_path" callback function.
568// Gets the path for a #GFile relative to a given path.
569func (x *FileIface) GetGetRelativePath() func(File, File) string {
570	if x.xGetRelativePath == 0 {
571		return nil
572	}
573	var rawCallback func(ParentVarp uintptr, DescendantVarp uintptr) string
574	purego.RegisterFunc(&rawCallback, x.xGetRelativePath)
575	return func(ParentVar File, DescendantVar File) string {
576		return rawCallback(ParentVar.GoPointer(), DescendantVar.GoPointer())
577	}
578}
579
580// OverrideResolveRelativePath sets the "resolve_relative_path" callback function.
581// Resolves a relative path for a #GFile to an absolute path.
582func (x *FileIface) OverrideResolveRelativePath(cb func(File, string) *FileBase) {
583	if cb == nil {
584		x.xResolveRelativePath = 0
585	} else {
586		x.xResolveRelativePath = purego.NewCallback(func(FileVarp uintptr, RelativePathVarp string) uintptr {
587			ret := cb(&FileBase{Ptr: FileVarp}, RelativePathVarp)
588			if ret == nil {
589				return 0
590			}
591			return ret.GoPointer()
592		})
593	}
594}
595
596// GetResolveRelativePath gets the "resolve_relative_path" callback function.
597// Resolves a relative path for a #GFile to an absolute path.
598func (x *FileIface) GetResolveRelativePath() func(File, string) *FileBase {
599	if x.xResolveRelativePath == 0 {
600		return nil
601	}
602	var rawCallback func(FileVarp uintptr, RelativePathVarp string) uintptr
603	purego.RegisterFunc(&rawCallback, x.xResolveRelativePath)
604	return func(FileVar File, RelativePathVar string) *FileBase {
605		rawRet := rawCallback(FileVar.GoPointer(), RelativePathVar)
606		if rawRet == 0 {
607			return nil
608		}
609		ret := &FileBase{}
610		ret.Ptr = rawRet
611		return ret
612	}
613}
614
615// OverrideGetChildForDisplayName sets the "get_child_for_display_name" callback function.
616// Gets the child #GFile for a given display name.
617func (x *FileIface) OverrideGetChildForDisplayName(cb func(File, string) *FileBase) {
618	if cb == nil {
619		x.xGetChildForDisplayName = 0
620	} else {
621		x.xGetChildForDisplayName = purego.NewCallback(func(FileVarp uintptr, DisplayNameVarp string) uintptr {
622			ret := cb(&FileBase{Ptr: FileVarp}, DisplayNameVarp)
623			if ret == nil {
624				return 0
625			}
626			return ret.GoPointer()
627		})
628	}
629}
630
631// GetGetChildForDisplayName gets the "get_child_for_display_name" callback function.
632// Gets the child #GFile for a given display name.
633func (x *FileIface) GetGetChildForDisplayName() func(File, string) *FileBase {
634	if x.xGetChildForDisplayName == 0 {
635		return nil
636	}
637	var rawCallback func(FileVarp uintptr, DisplayNameVarp string) uintptr
638	purego.RegisterFunc(&rawCallback, x.xGetChildForDisplayName)
639	return func(FileVar File, DisplayNameVar string) *FileBase {
640		rawRet := rawCallback(FileVar.GoPointer(), DisplayNameVar)
641		if rawRet == 0 {
642			return nil
643		}
644		ret := &FileBase{}
645		ret.Ptr = rawRet
646		return ret
647	}
648}
649
650// OverrideEnumerateChildren sets the "enumerate_children" callback function.
651// Gets a #GFileEnumerator with the children of a #GFile.
652func (x *FileIface) OverrideEnumerateChildren(cb func(File, string, FileQueryInfoFlags, *Cancellable) *FileEnumerator) {
653	if cb == nil {
654		x.xEnumerateChildren = 0
655	} else {
656		x.xEnumerateChildren = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) uintptr {
657			ret := cb(&FileBase{Ptr: FileVarp}, AttributesVarp, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
658			if ret == nil {
659				return 0
660			}
661			return ret.GoPointer()
662		})
663	}
664}
665
666// GetEnumerateChildren gets the "enumerate_children" callback function.
667// Gets a #GFileEnumerator with the children of a #GFile.
668func (x *FileIface) GetEnumerateChildren() func(File, string, FileQueryInfoFlags, *Cancellable) *FileEnumerator {
669	if x.xEnumerateChildren == 0 {
670		return nil
671	}
672	var rawCallback func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) uintptr
673	purego.RegisterFunc(&rawCallback, x.xEnumerateChildren)
674	return func(FileVar File, AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) *FileEnumerator {
675		rawRet := rawCallback(FileVar.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer())
676		if rawRet == 0 {
677			return nil
678		}
679		ret := &FileEnumerator{}
680		ret.Ptr = rawRet
681		return ret
682	}
683}
684
685// OverrideEnumerateChildrenAsync sets the "enumerate_children_async" callback function.
686// Asynchronously gets a #GFileEnumerator with the children of a #GFile.
687func (x *FileIface) OverrideEnumerateChildrenAsync(cb func(File, string, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
688	if cb == nil {
689		x.xEnumerateChildrenAsync = 0
690	} else {
691		x.xEnumerateChildrenAsync = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
692			cb(&FileBase{Ptr: FileVarp}, AttributesVarp, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
693		})
694	}
695}
696
697// GetEnumerateChildrenAsync gets the "enumerate_children_async" callback function.
698// Asynchronously gets a #GFileEnumerator with the children of a #GFile.
699func (x *FileIface) GetEnumerateChildrenAsync() func(File, string, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
700	if x.xEnumerateChildrenAsync == 0 {
701		return nil
702	}
703	var rawCallback func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
704	purego.RegisterFunc(&rawCallback, x.xEnumerateChildrenAsync)
705	return func(FileVar File, AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
706		rawCallback(FileVar.GoPointer(), AttributesVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
707	}
708}
709
710// OverrideEnumerateChildrenFinish sets the "enumerate_children_finish" callback function.
711// Finishes asynchronously enumerating the children.
712func (x *FileIface) OverrideEnumerateChildrenFinish(cb func(File, AsyncResult) *FileEnumerator) {
713	if cb == nil {
714		x.xEnumerateChildrenFinish = 0
715	} else {
716		x.xEnumerateChildrenFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
717			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
718			if ret == nil {
719				return 0
720			}
721			return ret.GoPointer()
722		})
723	}
724}
725
726// GetEnumerateChildrenFinish gets the "enumerate_children_finish" callback function.
727// Finishes asynchronously enumerating the children.
728func (x *FileIface) GetEnumerateChildrenFinish() func(File, AsyncResult) *FileEnumerator {
729	if x.xEnumerateChildrenFinish == 0 {
730		return nil
731	}
732	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
733	purego.RegisterFunc(&rawCallback, x.xEnumerateChildrenFinish)
734	return func(FileVar File, ResVar AsyncResult) *FileEnumerator {
735		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
736		if rawRet == 0 {
737			return nil
738		}
739		ret := &FileEnumerator{}
740		ret.Ptr = rawRet
741		return ret
742	}
743}
744
745// OverrideQueryInfo sets the "query_info" callback function.
746// Gets the #GFileInfo for a #GFile.
747func (x *FileIface) OverrideQueryInfo(cb func(File, string, FileQueryInfoFlags, *Cancellable) *FileInfo) {
748	if cb == nil {
749		x.xQueryInfo = 0
750	} else {
751		x.xQueryInfo = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) uintptr {
752			ret := cb(&FileBase{Ptr: FileVarp}, AttributesVarp, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
753			if ret == nil {
754				return 0
755			}
756			return ret.GoPointer()
757		})
758	}
759}
760
761// GetQueryInfo gets the "query_info" callback function.
762// Gets the #GFileInfo for a #GFile.
763func (x *FileIface) GetQueryInfo() func(File, string, FileQueryInfoFlags, *Cancellable) *FileInfo {
764	if x.xQueryInfo == 0 {
765		return nil
766	}
767	var rawCallback func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) uintptr
768	purego.RegisterFunc(&rawCallback, x.xQueryInfo)
769	return func(FileVar File, AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) *FileInfo {
770		rawRet := rawCallback(FileVar.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer())
771		if rawRet == 0 {
772			return nil
773		}
774		ret := &FileInfo{}
775		ret.Ptr = rawRet
776		return ret
777	}
778}
779
780// OverrideQueryInfoAsync sets the "query_info_async" callback function.
781// Asynchronously gets the #GFileInfo for a #GFile.
782func (x *FileIface) OverrideQueryInfoAsync(cb func(File, string, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
783	if cb == nil {
784		x.xQueryInfoAsync = 0
785	} else {
786		x.xQueryInfoAsync = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
787			cb(&FileBase{Ptr: FileVarp}, AttributesVarp, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
788		})
789	}
790}
791
792// GetQueryInfoAsync gets the "query_info_async" callback function.
793// Asynchronously gets the #GFileInfo for a #GFile.
794func (x *FileIface) GetQueryInfoAsync() func(File, string, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
795	if x.xQueryInfoAsync == 0 {
796		return nil
797	}
798	var rawCallback func(FileVarp uintptr, AttributesVarp string, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
799	purego.RegisterFunc(&rawCallback, x.xQueryInfoAsync)
800	return func(FileVar File, AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
801		rawCallback(FileVar.GoPointer(), AttributesVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
802	}
803}
804
805// OverrideQueryInfoFinish sets the "query_info_finish" callback function.
806// Finishes an asynchronous query info operation.
807func (x *FileIface) OverrideQueryInfoFinish(cb func(File, AsyncResult) *FileInfo) {
808	if cb == nil {
809		x.xQueryInfoFinish = 0
810	} else {
811		x.xQueryInfoFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
812			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
813			if ret == nil {
814				return 0
815			}
816			return ret.GoPointer()
817		})
818	}
819}
820
821// GetQueryInfoFinish gets the "query_info_finish" callback function.
822// Finishes an asynchronous query info operation.
823func (x *FileIface) GetQueryInfoFinish() func(File, AsyncResult) *FileInfo {
824	if x.xQueryInfoFinish == 0 {
825		return nil
826	}
827	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
828	purego.RegisterFunc(&rawCallback, x.xQueryInfoFinish)
829	return func(FileVar File, ResVar AsyncResult) *FileInfo {
830		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
831		if rawRet == 0 {
832			return nil
833		}
834		ret := &FileInfo{}
835		ret.Ptr = rawRet
836		return ret
837	}
838}
839
840// OverrideQueryFilesystemInfo sets the "query_filesystem_info" callback function.
841// Gets a #GFileInfo for the file system #GFile is on.
842func (x *FileIface) OverrideQueryFilesystemInfo(cb func(File, string, *Cancellable) *FileInfo) {
843	if cb == nil {
844		x.xQueryFilesystemInfo = 0
845	} else {
846		x.xQueryFilesystemInfo = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, CancellableVarp uintptr) uintptr {
847			ret := cb(&FileBase{Ptr: FileVarp}, AttributesVarp, CancellableNewFromInternalPtr(CancellableVarp))
848			if ret == nil {
849				return 0
850			}
851			return ret.GoPointer()
852		})
853	}
854}
855
856// GetQueryFilesystemInfo gets the "query_filesystem_info" callback function.
857// Gets a #GFileInfo for the file system #GFile is on.
858func (x *FileIface) GetQueryFilesystemInfo() func(File, string, *Cancellable) *FileInfo {
859	if x.xQueryFilesystemInfo == 0 {
860		return nil
861	}
862	var rawCallback func(FileVarp uintptr, AttributesVarp string, CancellableVarp uintptr) uintptr
863	purego.RegisterFunc(&rawCallback, x.xQueryFilesystemInfo)
864	return func(FileVar File, AttributesVar string, CancellableVar *Cancellable) *FileInfo {
865		rawRet := rawCallback(FileVar.GoPointer(), AttributesVar, CancellableVar.GoPointer())
866		if rawRet == 0 {
867			return nil
868		}
869		ret := &FileInfo{}
870		ret.Ptr = rawRet
871		return ret
872	}
873}
874
875// OverrideQueryFilesystemInfoAsync sets the "query_filesystem_info_async" callback function.
876// Asynchronously gets a #GFileInfo for the file system #GFile is on.
877func (x *FileIface) OverrideQueryFilesystemInfoAsync(cb func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
878	if cb == nil {
879		x.xQueryFilesystemInfoAsync = 0
880	} else {
881		x.xQueryFilesystemInfoAsync = purego.NewCallback(func(FileVarp uintptr, AttributesVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
882			cb(&FileBase{Ptr: FileVarp}, AttributesVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
883		})
884	}
885}
886
887// GetQueryFilesystemInfoAsync gets the "query_filesystem_info_async" callback function.
888// Asynchronously gets a #GFileInfo for the file system #GFile is on.
889func (x *FileIface) GetQueryFilesystemInfoAsync() func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr) {
890	if x.xQueryFilesystemInfoAsync == 0 {
891		return nil
892	}
893	var rawCallback func(FileVarp uintptr, AttributesVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
894	purego.RegisterFunc(&rawCallback, x.xQueryFilesystemInfoAsync)
895	return func(FileVar File, AttributesVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
896		rawCallback(FileVar.GoPointer(), AttributesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
897	}
898}
899
900// OverrideQueryFilesystemInfoFinish sets the "query_filesystem_info_finish" callback function.
901// Finishes asynchronously getting the file system info.
902func (x *FileIface) OverrideQueryFilesystemInfoFinish(cb func(File, AsyncResult) *FileInfo) {
903	if cb == nil {
904		x.xQueryFilesystemInfoFinish = 0
905	} else {
906		x.xQueryFilesystemInfoFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
907			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
908			if ret == nil {
909				return 0
910			}
911			return ret.GoPointer()
912		})
913	}
914}
915
916// GetQueryFilesystemInfoFinish gets the "query_filesystem_info_finish" callback function.
917// Finishes asynchronously getting the file system info.
918func (x *FileIface) GetQueryFilesystemInfoFinish() func(File, AsyncResult) *FileInfo {
919	if x.xQueryFilesystemInfoFinish == 0 {
920		return nil
921	}
922	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
923	purego.RegisterFunc(&rawCallback, x.xQueryFilesystemInfoFinish)
924	return func(FileVar File, ResVar AsyncResult) *FileInfo {
925		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
926		if rawRet == 0 {
927			return nil
928		}
929		ret := &FileInfo{}
930		ret.Ptr = rawRet
931		return ret
932	}
933}
934
935// OverrideFindEnclosingMount sets the "find_enclosing_mount" callback function.
936// Gets a #GMount for the #GFile.
937func (x *FileIface) OverrideFindEnclosingMount(cb func(File, *Cancellable) *MountBase) {
938	if cb == nil {
939		x.xFindEnclosingMount = 0
940	} else {
941		x.xFindEnclosingMount = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) uintptr {
942			ret := cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
943			if ret == nil {
944				return 0
945			}
946			return ret.GoPointer()
947		})
948	}
949}
950
951// GetFindEnclosingMount gets the "find_enclosing_mount" callback function.
952// Gets a #GMount for the #GFile.
953func (x *FileIface) GetFindEnclosingMount() func(File, *Cancellable) *MountBase {
954	if x.xFindEnclosingMount == 0 {
955		return nil
956	}
957	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) uintptr
958	purego.RegisterFunc(&rawCallback, x.xFindEnclosingMount)
959	return func(FileVar File, CancellableVar *Cancellable) *MountBase {
960		rawRet := rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
961		if rawRet == 0 {
962			return nil
963		}
964		ret := &MountBase{}
965		ret.Ptr = rawRet
966		return ret
967	}
968}
969
970// OverrideFindEnclosingMountAsync sets the "find_enclosing_mount_async" callback function.
971// Asynchronously gets the #GMount for a #GFile.
972func (x *FileIface) OverrideFindEnclosingMountAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
973	if cb == nil {
974		x.xFindEnclosingMountAsync = 0
975	} else {
976		x.xFindEnclosingMountAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
977			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
978		})
979	}
980}
981
982// GetFindEnclosingMountAsync gets the "find_enclosing_mount_async" callback function.
983// Asynchronously gets the #GMount for a #GFile.
984func (x *FileIface) GetFindEnclosingMountAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
985	if x.xFindEnclosingMountAsync == 0 {
986		return nil
987	}
988	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
989	purego.RegisterFunc(&rawCallback, x.xFindEnclosingMountAsync)
990	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
991		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
992	}
993}
994
995// OverrideFindEnclosingMountFinish sets the "find_enclosing_mount_finish" callback function.
996// Finishes asynchronously getting the volume.
997func (x *FileIface) OverrideFindEnclosingMountFinish(cb func(File, AsyncResult) *MountBase) {
998	if cb == nil {
999		x.xFindEnclosingMountFinish = 0
1000	} else {
1001		x.xFindEnclosingMountFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1002			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1003			if ret == nil {
1004				return 0
1005			}
1006			return ret.GoPointer()
1007		})
1008	}
1009}
1010
1011// GetFindEnclosingMountFinish gets the "find_enclosing_mount_finish" callback function.
1012// Finishes asynchronously getting the volume.
1013func (x *FileIface) GetFindEnclosingMountFinish() func(File, AsyncResult) *MountBase {
1014	if x.xFindEnclosingMountFinish == 0 {
1015		return nil
1016	}
1017	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1018	purego.RegisterFunc(&rawCallback, x.xFindEnclosingMountFinish)
1019	return func(FileVar File, ResVar AsyncResult) *MountBase {
1020		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1021		if rawRet == 0 {
1022			return nil
1023		}
1024		ret := &MountBase{}
1025		ret.Ptr = rawRet
1026		return ret
1027	}
1028}
1029
1030// OverrideSetDisplayName sets the "set_display_name" callback function.
1031// Sets the display name for a #GFile.
1032func (x *FileIface) OverrideSetDisplayName(cb func(File, string, *Cancellable) *FileBase) {
1033	if cb == nil {
1034		x.xSetDisplayName = 0
1035	} else {
1036		x.xSetDisplayName = purego.NewCallback(func(FileVarp uintptr, DisplayNameVarp string, CancellableVarp uintptr) uintptr {
1037			ret := cb(&FileBase{Ptr: FileVarp}, DisplayNameVarp, CancellableNewFromInternalPtr(CancellableVarp))
1038			if ret == nil {
1039				return 0
1040			}
1041			return ret.GoPointer()
1042		})
1043	}
1044}
1045
1046// GetSetDisplayName gets the "set_display_name" callback function.
1047// Sets the display name for a #GFile.
1048func (x *FileIface) GetSetDisplayName() func(File, string, *Cancellable) *FileBase {
1049	if x.xSetDisplayName == 0 {
1050		return nil
1051	}
1052	var rawCallback func(FileVarp uintptr, DisplayNameVarp string, CancellableVarp uintptr) uintptr
1053	purego.RegisterFunc(&rawCallback, x.xSetDisplayName)
1054	return func(FileVar File, DisplayNameVar string, CancellableVar *Cancellable) *FileBase {
1055		rawRet := rawCallback(FileVar.GoPointer(), DisplayNameVar, CancellableVar.GoPointer())
1056		if rawRet == 0 {
1057			return nil
1058		}
1059		ret := &FileBase{}
1060		ret.Ptr = rawRet
1061		return ret
1062	}
1063}
1064
1065// OverrideSetDisplayNameAsync sets the "set_display_name_async" callback function.
1066// Asynchronously sets a #GFile's display name.
1067func (x *FileIface) OverrideSetDisplayNameAsync(cb func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1068	if cb == nil {
1069		x.xSetDisplayNameAsync = 0
1070	} else {
1071		x.xSetDisplayNameAsync = purego.NewCallback(func(FileVarp uintptr, DisplayNameVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1072			cb(&FileBase{Ptr: FileVarp}, DisplayNameVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1073		})
1074	}
1075}
1076
1077// GetSetDisplayNameAsync gets the "set_display_name_async" callback function.
1078// Asynchronously sets a #GFile's display name.
1079func (x *FileIface) GetSetDisplayNameAsync() func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1080	if x.xSetDisplayNameAsync == 0 {
1081		return nil
1082	}
1083	var rawCallback func(FileVarp uintptr, DisplayNameVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1084	purego.RegisterFunc(&rawCallback, x.xSetDisplayNameAsync)
1085	return func(FileVar File, DisplayNameVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1086		rawCallback(FileVar.GoPointer(), DisplayNameVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1087	}
1088}
1089
1090// OverrideSetDisplayNameFinish sets the "set_display_name_finish" callback function.
1091// Finishes asynchronously setting a #GFile's display name.
1092func (x *FileIface) OverrideSetDisplayNameFinish(cb func(File, AsyncResult) *FileBase) {
1093	if cb == nil {
1094		x.xSetDisplayNameFinish = 0
1095	} else {
1096		x.xSetDisplayNameFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1097			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1098			if ret == nil {
1099				return 0
1100			}
1101			return ret.GoPointer()
1102		})
1103	}
1104}
1105
1106// GetSetDisplayNameFinish gets the "set_display_name_finish" callback function.
1107// Finishes asynchronously setting a #GFile's display name.
1108func (x *FileIface) GetSetDisplayNameFinish() func(File, AsyncResult) *FileBase {
1109	if x.xSetDisplayNameFinish == 0 {
1110		return nil
1111	}
1112	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1113	purego.RegisterFunc(&rawCallback, x.xSetDisplayNameFinish)
1114	return func(FileVar File, ResVar AsyncResult) *FileBase {
1115		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1116		if rawRet == 0 {
1117			return nil
1118		}
1119		ret := &FileBase{}
1120		ret.Ptr = rawRet
1121		return ret
1122	}
1123}
1124
1125// OverrideQuerySettableAttributes sets the "query_settable_attributes" callback function.
1126// Returns a list of #GFileAttributeInfos that can be set.
1127func (x *FileIface) OverrideQuerySettableAttributes(cb func(File, *Cancellable) *FileAttributeInfoList) {
1128	if cb == nil {
1129		x.xQuerySettableAttributes = 0
1130	} else {
1131		x.xQuerySettableAttributes = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) *FileAttributeInfoList {
1132			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1133		})
1134	}
1135}
1136
1137// GetQuerySettableAttributes gets the "query_settable_attributes" callback function.
1138// Returns a list of #GFileAttributeInfos that can be set.
1139func (x *FileIface) GetQuerySettableAttributes() func(File, *Cancellable) *FileAttributeInfoList {
1140	if x.xQuerySettableAttributes == 0 {
1141		return nil
1142	}
1143	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) *FileAttributeInfoList
1144	purego.RegisterFunc(&rawCallback, x.xQuerySettableAttributes)
1145	return func(FileVar File, CancellableVar *Cancellable) *FileAttributeInfoList {
1146		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1147	}
1148}
1149
1150// OverrideQuerySettableAttributesAsync sets the "_query_settable_attributes_async" callback function.
1151// Asynchronously gets a list of #GFileAttributeInfos that can be set.
1152func (x *FileIface) OverrideQuerySettableAttributesAsync(cb func()) {
1153	if cb == nil {
1154		x.xQuerySettableAttributesAsync = 0
1155	} else {
1156		x.xQuerySettableAttributesAsync = purego.NewCallback(func() {
1157			cb()
1158		})
1159	}
1160}
1161
1162// GetQuerySettableAttributesAsync gets the "_query_settable_attributes_async" callback function.
1163// Asynchronously gets a list of #GFileAttributeInfos that can be set.
1164func (x *FileIface) GetQuerySettableAttributesAsync() func() {
1165	if x.xQuerySettableAttributesAsync == 0 {
1166		return nil
1167	}
1168	var rawCallback func()
1169	purego.RegisterFunc(&rawCallback, x.xQuerySettableAttributesAsync)
1170	return func() {
1171		rawCallback()
1172	}
1173}
1174
1175// OverrideQuerySettableAttributesFinish sets the "_query_settable_attributes_finish" callback function.
1176// Finishes asynchronously querying settable attributes.
1177func (x *FileIface) OverrideQuerySettableAttributesFinish(cb func()) {
1178	if cb == nil {
1179		x.xQuerySettableAttributesFinish = 0
1180	} else {
1181		x.xQuerySettableAttributesFinish = purego.NewCallback(func() {
1182			cb()
1183		})
1184	}
1185}
1186
1187// GetQuerySettableAttributesFinish gets the "_query_settable_attributes_finish" callback function.
1188// Finishes asynchronously querying settable attributes.
1189func (x *FileIface) GetQuerySettableAttributesFinish() func() {
1190	if x.xQuerySettableAttributesFinish == 0 {
1191		return nil
1192	}
1193	var rawCallback func()
1194	purego.RegisterFunc(&rawCallback, x.xQuerySettableAttributesFinish)
1195	return func() {
1196		rawCallback()
1197	}
1198}
1199
1200// OverrideQueryWritableNamespaces sets the "query_writable_namespaces" callback function.
1201// Returns a list of #GFileAttributeInfo namespaces that are writable.
1202func (x *FileIface) OverrideQueryWritableNamespaces(cb func(File, *Cancellable) *FileAttributeInfoList) {
1203	if cb == nil {
1204		x.xQueryWritableNamespaces = 0
1205	} else {
1206		x.xQueryWritableNamespaces = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) *FileAttributeInfoList {
1207			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1208		})
1209	}
1210}
1211
1212// GetQueryWritableNamespaces gets the "query_writable_namespaces" callback function.
1213// Returns a list of #GFileAttributeInfo namespaces that are writable.
1214func (x *FileIface) GetQueryWritableNamespaces() func(File, *Cancellable) *FileAttributeInfoList {
1215	if x.xQueryWritableNamespaces == 0 {
1216		return nil
1217	}
1218	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) *FileAttributeInfoList
1219	purego.RegisterFunc(&rawCallback, x.xQueryWritableNamespaces)
1220	return func(FileVar File, CancellableVar *Cancellable) *FileAttributeInfoList {
1221		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1222	}
1223}
1224
1225// OverrideQueryWritableNamespacesAsync sets the "_query_writable_namespaces_async" callback function.
1226// Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable.
1227func (x *FileIface) OverrideQueryWritableNamespacesAsync(cb func()) {
1228	if cb == nil {
1229		x.xQueryWritableNamespacesAsync = 0
1230	} else {
1231		x.xQueryWritableNamespacesAsync = purego.NewCallback(func() {
1232			cb()
1233		})
1234	}
1235}
1236
1237// GetQueryWritableNamespacesAsync gets the "_query_writable_namespaces_async" callback function.
1238// Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable.
1239func (x *FileIface) GetQueryWritableNamespacesAsync() func() {
1240	if x.xQueryWritableNamespacesAsync == 0 {
1241		return nil
1242	}
1243	var rawCallback func()
1244	purego.RegisterFunc(&rawCallback, x.xQueryWritableNamespacesAsync)
1245	return func() {
1246		rawCallback()
1247	}
1248}
1249
1250// OverrideQueryWritableNamespacesFinish sets the "_query_writable_namespaces_finish" callback function.
1251// Finishes asynchronously querying the writable namespaces.
1252func (x *FileIface) OverrideQueryWritableNamespacesFinish(cb func()) {
1253	if cb == nil {
1254		x.xQueryWritableNamespacesFinish = 0
1255	} else {
1256		x.xQueryWritableNamespacesFinish = purego.NewCallback(func() {
1257			cb()
1258		})
1259	}
1260}
1261
1262// GetQueryWritableNamespacesFinish gets the "_query_writable_namespaces_finish" callback function.
1263// Finishes asynchronously querying the writable namespaces.
1264func (x *FileIface) GetQueryWritableNamespacesFinish() func() {
1265	if x.xQueryWritableNamespacesFinish == 0 {
1266		return nil
1267	}
1268	var rawCallback func()
1269	purego.RegisterFunc(&rawCallback, x.xQueryWritableNamespacesFinish)
1270	return func() {
1271		rawCallback()
1272	}
1273}
1274
1275// OverrideSetAttribute sets the "set_attribute" callback function.
1276// Sets a #GFileAttributeInfo.
1277func (x *FileIface) OverrideSetAttribute(cb func(File, string, FileAttributeType, uintptr, FileQueryInfoFlags, *Cancellable) bool) {
1278	if cb == nil {
1279		x.xSetAttribute = 0
1280	} else {
1281		x.xSetAttribute = purego.NewCallback(func(FileVarp uintptr, AttributeVarp string, TypeVarp FileAttributeType, ValuePVarp uintptr, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) bool {
1282			return cb(&FileBase{Ptr: FileVarp}, AttributeVarp, TypeVarp, ValuePVarp, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
1283		})
1284	}
1285}
1286
1287// GetSetAttribute gets the "set_attribute" callback function.
1288// Sets a #GFileAttributeInfo.
1289func (x *FileIface) GetSetAttribute() func(File, string, FileAttributeType, uintptr, FileQueryInfoFlags, *Cancellable) bool {
1290	if x.xSetAttribute == 0 {
1291		return nil
1292	}
1293	var rawCallback func(FileVarp uintptr, AttributeVarp string, TypeVarp FileAttributeType, ValuePVarp uintptr, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) bool
1294	purego.RegisterFunc(&rawCallback, x.xSetAttribute)
1295	return func(FileVar File, AttributeVar string, TypeVar FileAttributeType, ValuePVar uintptr, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {
1296		return rawCallback(FileVar.GoPointer(), AttributeVar, TypeVar, ValuePVar, FlagsVar, CancellableVar.GoPointer())
1297	}
1298}
1299
1300// OverrideSetAttributesFromInfo sets the "set_attributes_from_info" callback function.
1301// Sets a #GFileAttributeInfo with information from a #GFileInfo.
1302func (x *FileIface) OverrideSetAttributesFromInfo(cb func(File, *FileInfo, FileQueryInfoFlags, *Cancellable) bool) {
1303	if cb == nil {
1304		x.xSetAttributesFromInfo = 0
1305	} else {
1306		x.xSetAttributesFromInfo = purego.NewCallback(func(FileVarp uintptr, InfoVarp uintptr, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) bool {
1307			return cb(&FileBase{Ptr: FileVarp}, FileInfoNewFromInternalPtr(InfoVarp), FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
1308		})
1309	}
1310}
1311
1312// GetSetAttributesFromInfo gets the "set_attributes_from_info" callback function.
1313// Sets a #GFileAttributeInfo with information from a #GFileInfo.
1314func (x *FileIface) GetSetAttributesFromInfo() func(File, *FileInfo, FileQueryInfoFlags, *Cancellable) bool {
1315	if x.xSetAttributesFromInfo == 0 {
1316		return nil
1317	}
1318	var rawCallback func(FileVarp uintptr, InfoVarp uintptr, FlagsVarp FileQueryInfoFlags, CancellableVarp uintptr) bool
1319	purego.RegisterFunc(&rawCallback, x.xSetAttributesFromInfo)
1320	return func(FileVar File, InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {
1321		return rawCallback(FileVar.GoPointer(), InfoVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
1322	}
1323}
1324
1325// OverrideSetAttributesAsync sets the "set_attributes_async" callback function.
1326// Asynchronously sets a file's attributes.
1327func (x *FileIface) OverrideSetAttributesAsync(cb func(File, *FileInfo, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1328	if cb == nil {
1329		x.xSetAttributesAsync = 0
1330	} else {
1331		x.xSetAttributesAsync = purego.NewCallback(func(FileVarp uintptr, InfoVarp uintptr, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1332			cb(&FileBase{Ptr: FileVarp}, FileInfoNewFromInternalPtr(InfoVarp), FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1333		})
1334	}
1335}
1336
1337// GetSetAttributesAsync gets the "set_attributes_async" callback function.
1338// Asynchronously sets a file's attributes.
1339func (x *FileIface) GetSetAttributesAsync() func(File, *FileInfo, FileQueryInfoFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1340	if x.xSetAttributesAsync == 0 {
1341		return nil
1342	}
1343	var rawCallback func(FileVarp uintptr, InfoVarp uintptr, FlagsVarp FileQueryInfoFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1344	purego.RegisterFunc(&rawCallback, x.xSetAttributesAsync)
1345	return func(FileVar File, InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1346		rawCallback(FileVar.GoPointer(), InfoVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1347	}
1348}
1349
1350// OverrideSetAttributesFinish sets the "set_attributes_finish" callback function.
1351// Finishes setting a file's attributes asynchronously.
1352func (x *FileIface) OverrideSetAttributesFinish(cb func(File, AsyncResult, **FileInfo) bool) {
1353	if cb == nil {
1354		x.xSetAttributesFinish = 0
1355	} else {
1356		x.xSetAttributesFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr, InfoVarp **FileInfo) bool {
1357			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp}, InfoVarp)
1358		})
1359	}
1360}
1361
1362// GetSetAttributesFinish gets the "set_attributes_finish" callback function.
1363// Finishes setting a file's attributes asynchronously.
1364func (x *FileIface) GetSetAttributesFinish() func(File, AsyncResult, **FileInfo) bool {
1365	if x.xSetAttributesFinish == 0 {
1366		return nil
1367	}
1368	var rawCallback func(FileVarp uintptr, ResultVarp uintptr, InfoVarp **FileInfo) bool
1369	purego.RegisterFunc(&rawCallback, x.xSetAttributesFinish)
1370	return func(FileVar File, ResultVar AsyncResult, InfoVar **FileInfo) bool {
1371		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer(), InfoVar)
1372	}
1373}
1374
1375// OverrideReadFn sets the "read_fn" callback function.
1376// Reads a file asynchronously.
1377func (x *FileIface) OverrideReadFn(cb func(File, *Cancellable) *FileInputStream) {
1378	if cb == nil {
1379		x.xReadFn = 0
1380	} else {
1381		x.xReadFn = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) uintptr {
1382			ret := cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1383			if ret == nil {
1384				return 0
1385			}
1386			return ret.GoPointer()
1387		})
1388	}
1389}
1390
1391// GetReadFn gets the "read_fn" callback function.
1392// Reads a file asynchronously.
1393func (x *FileIface) GetReadFn() func(File, *Cancellable) *FileInputStream {
1394	if x.xReadFn == 0 {
1395		return nil
1396	}
1397	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) uintptr
1398	purego.RegisterFunc(&rawCallback, x.xReadFn)
1399	return func(FileVar File, CancellableVar *Cancellable) *FileInputStream {
1400		rawRet := rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1401		if rawRet == 0 {
1402			return nil
1403		}
1404		ret := &FileInputStream{}
1405		ret.Ptr = rawRet
1406		return ret
1407	}
1408}
1409
1410// OverrideReadAsync sets the "read_async" callback function.
1411// Asynchronously reads a file.
1412func (x *FileIface) OverrideReadAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1413	if cb == nil {
1414		x.xReadAsync = 0
1415	} else {
1416		x.xReadAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1417			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1418		})
1419	}
1420}
1421
1422// GetReadAsync gets the "read_async" callback function.
1423// Asynchronously reads a file.
1424func (x *FileIface) GetReadAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1425	if x.xReadAsync == 0 {
1426		return nil
1427	}
1428	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1429	purego.RegisterFunc(&rawCallback, x.xReadAsync)
1430	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1431		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1432	}
1433}
1434
1435// OverrideReadFinish sets the "read_finish" callback function.
1436// Finishes asynchronously reading a file.
1437func (x *FileIface) OverrideReadFinish(cb func(File, AsyncResult) *FileInputStream) {
1438	if cb == nil {
1439		x.xReadFinish = 0
1440	} else {
1441		x.xReadFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1442			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1443			if ret == nil {
1444				return 0
1445			}
1446			return ret.GoPointer()
1447		})
1448	}
1449}
1450
1451// GetReadFinish gets the "read_finish" callback function.
1452// Finishes asynchronously reading a file.
1453func (x *FileIface) GetReadFinish() func(File, AsyncResult) *FileInputStream {
1454	if x.xReadFinish == 0 {
1455		return nil
1456	}
1457	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1458	purego.RegisterFunc(&rawCallback, x.xReadFinish)
1459	return func(FileVar File, ResVar AsyncResult) *FileInputStream {
1460		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1461		if rawRet == 0 {
1462			return nil
1463		}
1464		ret := &FileInputStream{}
1465		ret.Ptr = rawRet
1466		return ret
1467	}
1468}
1469
1470// OverrideAppendTo sets the "append_to" callback function.
1471// Writes to the end of a file.
1472func (x *FileIface) OverrideAppendTo(cb func(File, FileCreateFlags, *Cancellable) *FileOutputStream) {
1473	if cb == nil {
1474		x.xAppendTo = 0
1475	} else {
1476		x.xAppendTo = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr {
1477			ret := cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
1478			if ret == nil {
1479				return 0
1480			}
1481			return ret.GoPointer()
1482		})
1483	}
1484}
1485
1486// GetAppendTo gets the "append_to" callback function.
1487// Writes to the end of a file.
1488func (x *FileIface) GetAppendTo() func(File, FileCreateFlags, *Cancellable) *FileOutputStream {
1489	if x.xAppendTo == 0 {
1490		return nil
1491	}
1492	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr
1493	purego.RegisterFunc(&rawCallback, x.xAppendTo)
1494	return func(FileVar File, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {
1495		rawRet := rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
1496		if rawRet == 0 {
1497			return nil
1498		}
1499		ret := &FileOutputStream{}
1500		ret.Ptr = rawRet
1501		return ret
1502	}
1503}
1504
1505// OverrideAppendToAsync sets the "append_to_async" callback function.
1506// Asynchronously writes to the end of a file.
1507func (x *FileIface) OverrideAppendToAsync(cb func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1508	if cb == nil {
1509		x.xAppendToAsync = 0
1510	} else {
1511		x.xAppendToAsync = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1512			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1513		})
1514	}
1515}
1516
1517// GetAppendToAsync gets the "append_to_async" callback function.
1518// Asynchronously writes to the end of a file.
1519func (x *FileIface) GetAppendToAsync() func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1520	if x.xAppendToAsync == 0 {
1521		return nil
1522	}
1523	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1524	purego.RegisterFunc(&rawCallback, x.xAppendToAsync)
1525	return func(FileVar File, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1526		rawCallback(FileVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1527	}
1528}
1529
1530// OverrideAppendToFinish sets the "append_to_finish" callback function.
1531// Finishes an asynchronous file append operation.
1532func (x *FileIface) OverrideAppendToFinish(cb func(File, AsyncResult) *FileOutputStream) {
1533	if cb == nil {
1534		x.xAppendToFinish = 0
1535	} else {
1536		x.xAppendToFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1537			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1538			if ret == nil {
1539				return 0
1540			}
1541			return ret.GoPointer()
1542		})
1543	}
1544}
1545
1546// GetAppendToFinish gets the "append_to_finish" callback function.
1547// Finishes an asynchronous file append operation.
1548func (x *FileIface) GetAppendToFinish() func(File, AsyncResult) *FileOutputStream {
1549	if x.xAppendToFinish == 0 {
1550		return nil
1551	}
1552	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1553	purego.RegisterFunc(&rawCallback, x.xAppendToFinish)
1554	return func(FileVar File, ResVar AsyncResult) *FileOutputStream {
1555		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1556		if rawRet == 0 {
1557			return nil
1558		}
1559		ret := &FileOutputStream{}
1560		ret.Ptr = rawRet
1561		return ret
1562	}
1563}
1564
1565// OverrideCreate sets the "create" callback function.
1566// Creates a new file.
1567func (x *FileIface) OverrideCreate(cb func(File, FileCreateFlags, *Cancellable) *FileOutputStream) {
1568	if cb == nil {
1569		x.xCreate = 0
1570	} else {
1571		x.xCreate = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr {
1572			ret := cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
1573			if ret == nil {
1574				return 0
1575			}
1576			return ret.GoPointer()
1577		})
1578	}
1579}
1580
1581// GetCreate gets the "create" callback function.
1582// Creates a new file.
1583func (x *FileIface) GetCreate() func(File, FileCreateFlags, *Cancellable) *FileOutputStream {
1584	if x.xCreate == 0 {
1585		return nil
1586	}
1587	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr
1588	purego.RegisterFunc(&rawCallback, x.xCreate)
1589	return func(FileVar File, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {
1590		rawRet := rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
1591		if rawRet == 0 {
1592			return nil
1593		}
1594		ret := &FileOutputStream{}
1595		ret.Ptr = rawRet
1596		return ret
1597	}
1598}
1599
1600// OverrideCreateAsync sets the "create_async" callback function.
1601// Asynchronously creates a file.
1602func (x *FileIface) OverrideCreateAsync(cb func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1603	if cb == nil {
1604		x.xCreateAsync = 0
1605	} else {
1606		x.xCreateAsync = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1607			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1608		})
1609	}
1610}
1611
1612// GetCreateAsync gets the "create_async" callback function.
1613// Asynchronously creates a file.
1614func (x *FileIface) GetCreateAsync() func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1615	if x.xCreateAsync == 0 {
1616		return nil
1617	}
1618	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1619	purego.RegisterFunc(&rawCallback, x.xCreateAsync)
1620	return func(FileVar File, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1621		rawCallback(FileVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1622	}
1623}
1624
1625// OverrideCreateFinish sets the "create_finish" callback function.
1626// Finishes asynchronously creating a file.
1627func (x *FileIface) OverrideCreateFinish(cb func(File, AsyncResult) *FileOutputStream) {
1628	if cb == nil {
1629		x.xCreateFinish = 0
1630	} else {
1631		x.xCreateFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1632			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1633			if ret == nil {
1634				return 0
1635			}
1636			return ret.GoPointer()
1637		})
1638	}
1639}
1640
1641// GetCreateFinish gets the "create_finish" callback function.
1642// Finishes asynchronously creating a file.
1643func (x *FileIface) GetCreateFinish() func(File, AsyncResult) *FileOutputStream {
1644	if x.xCreateFinish == 0 {
1645		return nil
1646	}
1647	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1648	purego.RegisterFunc(&rawCallback, x.xCreateFinish)
1649	return func(FileVar File, ResVar AsyncResult) *FileOutputStream {
1650		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1651		if rawRet == 0 {
1652			return nil
1653		}
1654		ret := &FileOutputStream{}
1655		ret.Ptr = rawRet
1656		return ret
1657	}
1658}
1659
1660// OverrideReplace sets the "replace" callback function.
1661// Replaces the contents of a file.
1662func (x *FileIface) OverrideReplace(cb func(File, string, bool, FileCreateFlags, *Cancellable) *FileOutputStream) {
1663	if cb == nil {
1664		x.xReplace = 0
1665	} else {
1666		x.xReplace = purego.NewCallback(func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr {
1667			ret := cb(&FileBase{Ptr: FileVarp}, EtagVarp, MakeBackupVarp, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
1668			if ret == nil {
1669				return 0
1670			}
1671			return ret.GoPointer()
1672		})
1673	}
1674}
1675
1676// GetReplace gets the "replace" callback function.
1677// Replaces the contents of a file.
1678func (x *FileIface) GetReplace() func(File, string, bool, FileCreateFlags, *Cancellable) *FileOutputStream {
1679	if x.xReplace == 0 {
1680		return nil
1681	}
1682	var rawCallback func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr
1683	purego.RegisterFunc(&rawCallback, x.xReplace)
1684	return func(FileVar File, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {
1685		rawRet := rawCallback(FileVar.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer())
1686		if rawRet == 0 {
1687			return nil
1688		}
1689		ret := &FileOutputStream{}
1690		ret.Ptr = rawRet
1691		return ret
1692	}
1693}
1694
1695// OverrideReplaceAsync sets the "replace_async" callback function.
1696// Asynchronously replaces the contents of a file.
1697func (x *FileIface) OverrideReplaceAsync(cb func(File, string, bool, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1698	if cb == nil {
1699		x.xReplaceAsync = 0
1700	} else {
1701		x.xReplaceAsync = purego.NewCallback(func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1702			cb(&FileBase{Ptr: FileVarp}, EtagVarp, MakeBackupVarp, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1703		})
1704	}
1705}
1706
1707// GetReplaceAsync gets the "replace_async" callback function.
1708// Asynchronously replaces the contents of a file.
1709func (x *FileIface) GetReplaceAsync() func(File, string, bool, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1710	if x.xReplaceAsync == 0 {
1711		return nil
1712	}
1713	var rawCallback func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1714	purego.RegisterFunc(&rawCallback, x.xReplaceAsync)
1715	return func(FileVar File, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1716		rawCallback(FileVar.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1717	}
1718}
1719
1720// OverrideReplaceFinish sets the "replace_finish" callback function.
1721// Finishes asynchronously replacing a file.
1722func (x *FileIface) OverrideReplaceFinish(cb func(File, AsyncResult) *FileOutputStream) {
1723	if cb == nil {
1724		x.xReplaceFinish = 0
1725	} else {
1726		x.xReplaceFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
1727			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
1728			if ret == nil {
1729				return 0
1730			}
1731			return ret.GoPointer()
1732		})
1733	}
1734}
1735
1736// GetReplaceFinish gets the "replace_finish" callback function.
1737// Finishes asynchronously replacing a file.
1738func (x *FileIface) GetReplaceFinish() func(File, AsyncResult) *FileOutputStream {
1739	if x.xReplaceFinish == 0 {
1740		return nil
1741	}
1742	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
1743	purego.RegisterFunc(&rawCallback, x.xReplaceFinish)
1744	return func(FileVar File, ResVar AsyncResult) *FileOutputStream {
1745		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
1746		if rawRet == 0 {
1747			return nil
1748		}
1749		ret := &FileOutputStream{}
1750		ret.Ptr = rawRet
1751		return ret
1752	}
1753}
1754
1755// OverrideDeleteFile sets the "delete_file" callback function.
1756// Deletes a file.
1757func (x *FileIface) OverrideDeleteFile(cb func(File, *Cancellable) bool) {
1758	if cb == nil {
1759		x.xDeleteFile = 0
1760	} else {
1761		x.xDeleteFile = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) bool {
1762			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1763		})
1764	}
1765}
1766
1767// GetDeleteFile gets the "delete_file" callback function.
1768// Deletes a file.
1769func (x *FileIface) GetDeleteFile() func(File, *Cancellable) bool {
1770	if x.xDeleteFile == 0 {
1771		return nil
1772	}
1773	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) bool
1774	purego.RegisterFunc(&rawCallback, x.xDeleteFile)
1775	return func(FileVar File, CancellableVar *Cancellable) bool {
1776		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1777	}
1778}
1779
1780// OverrideDeleteFileAsync sets the "delete_file_async" callback function.
1781// Asynchronously deletes a file.
1782func (x *FileIface) OverrideDeleteFileAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1783	if cb == nil {
1784		x.xDeleteFileAsync = 0
1785	} else {
1786		x.xDeleteFileAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1787			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1788		})
1789	}
1790}
1791
1792// GetDeleteFileAsync gets the "delete_file_async" callback function.
1793// Asynchronously deletes a file.
1794func (x *FileIface) GetDeleteFileAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1795	if x.xDeleteFileAsync == 0 {
1796		return nil
1797	}
1798	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1799	purego.RegisterFunc(&rawCallback, x.xDeleteFileAsync)
1800	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1801		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1802	}
1803}
1804
1805// OverrideDeleteFileFinish sets the "delete_file_finish" callback function.
1806// Finishes an asynchronous delete.
1807func (x *FileIface) OverrideDeleteFileFinish(cb func(File, AsyncResult) bool) {
1808	if cb == nil {
1809		x.xDeleteFileFinish = 0
1810	} else {
1811		x.xDeleteFileFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
1812			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
1813		})
1814	}
1815}
1816
1817// GetDeleteFileFinish gets the "delete_file_finish" callback function.
1818// Finishes an asynchronous delete.
1819func (x *FileIface) GetDeleteFileFinish() func(File, AsyncResult) bool {
1820	if x.xDeleteFileFinish == 0 {
1821		return nil
1822	}
1823	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
1824	purego.RegisterFunc(&rawCallback, x.xDeleteFileFinish)
1825	return func(FileVar File, ResultVar AsyncResult) bool {
1826		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
1827	}
1828}
1829
1830// OverrideTrash sets the "trash" callback function.
1831// Sends a #GFile to the Trash location.
1832func (x *FileIface) OverrideTrash(cb func(File, *Cancellable) bool) {
1833	if cb == nil {
1834		x.xTrash = 0
1835	} else {
1836		x.xTrash = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) bool {
1837			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1838		})
1839	}
1840}
1841
1842// GetTrash gets the "trash" callback function.
1843// Sends a #GFile to the Trash location.
1844func (x *FileIface) GetTrash() func(File, *Cancellable) bool {
1845	if x.xTrash == 0 {
1846		return nil
1847	}
1848	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) bool
1849	purego.RegisterFunc(&rawCallback, x.xTrash)
1850	return func(FileVar File, CancellableVar *Cancellable) bool {
1851		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1852	}
1853}
1854
1855// OverrideTrashAsync sets the "trash_async" callback function.
1856// Asynchronously sends a #GFile to the Trash location.
1857func (x *FileIface) OverrideTrashAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1858	if cb == nil {
1859		x.xTrashAsync = 0
1860	} else {
1861		x.xTrashAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1862			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1863		})
1864	}
1865}
1866
1867// GetTrashAsync gets the "trash_async" callback function.
1868// Asynchronously sends a #GFile to the Trash location.
1869func (x *FileIface) GetTrashAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1870	if x.xTrashAsync == 0 {
1871		return nil
1872	}
1873	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1874	purego.RegisterFunc(&rawCallback, x.xTrashAsync)
1875	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1876		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1877	}
1878}
1879
1880// OverrideTrashFinish sets the "trash_finish" callback function.
1881// Finishes an asynchronous file trashing operation.
1882func (x *FileIface) OverrideTrashFinish(cb func(File, AsyncResult) bool) {
1883	if cb == nil {
1884		x.xTrashFinish = 0
1885	} else {
1886		x.xTrashFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
1887			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
1888		})
1889	}
1890}
1891
1892// GetTrashFinish gets the "trash_finish" callback function.
1893// Finishes an asynchronous file trashing operation.
1894func (x *FileIface) GetTrashFinish() func(File, AsyncResult) bool {
1895	if x.xTrashFinish == 0 {
1896		return nil
1897	}
1898	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
1899	purego.RegisterFunc(&rawCallback, x.xTrashFinish)
1900	return func(FileVar File, ResultVar AsyncResult) bool {
1901		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
1902	}
1903}
1904
1905// OverrideMakeDirectory sets the "make_directory" callback function.
1906// Makes a directory.
1907func (x *FileIface) OverrideMakeDirectory(cb func(File, *Cancellable) bool) {
1908	if cb == nil {
1909		x.xMakeDirectory = 0
1910	} else {
1911		x.xMakeDirectory = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) bool {
1912			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
1913		})
1914	}
1915}
1916
1917// GetMakeDirectory gets the "make_directory" callback function.
1918// Makes a directory.
1919func (x *FileIface) GetMakeDirectory() func(File, *Cancellable) bool {
1920	if x.xMakeDirectory == 0 {
1921		return nil
1922	}
1923	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) bool
1924	purego.RegisterFunc(&rawCallback, x.xMakeDirectory)
1925	return func(FileVar File, CancellableVar *Cancellable) bool {
1926		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
1927	}
1928}
1929
1930// OverrideMakeDirectoryAsync sets the "make_directory_async" callback function.
1931// Asynchronously makes a directory.
1932func (x *FileIface) OverrideMakeDirectoryAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
1933	if cb == nil {
1934		x.xMakeDirectoryAsync = 0
1935	} else {
1936		x.xMakeDirectoryAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
1937			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
1938		})
1939	}
1940}
1941
1942// GetMakeDirectoryAsync gets the "make_directory_async" callback function.
1943// Asynchronously makes a directory.
1944func (x *FileIface) GetMakeDirectoryAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
1945	if x.xMakeDirectoryAsync == 0 {
1946		return nil
1947	}
1948	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
1949	purego.RegisterFunc(&rawCallback, x.xMakeDirectoryAsync)
1950	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1951		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1952	}
1953}
1954
1955// OverrideMakeDirectoryFinish sets the "make_directory_finish" callback function.
1956// Finishes making a directory asynchronously.
1957func (x *FileIface) OverrideMakeDirectoryFinish(cb func(File, AsyncResult) bool) {
1958	if cb == nil {
1959		x.xMakeDirectoryFinish = 0
1960	} else {
1961		x.xMakeDirectoryFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
1962			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
1963		})
1964	}
1965}
1966
1967// GetMakeDirectoryFinish gets the "make_directory_finish" callback function.
1968// Finishes making a directory asynchronously.
1969func (x *FileIface) GetMakeDirectoryFinish() func(File, AsyncResult) bool {
1970	if x.xMakeDirectoryFinish == 0 {
1971		return nil
1972	}
1973	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
1974	purego.RegisterFunc(&rawCallback, x.xMakeDirectoryFinish)
1975	return func(FileVar File, ResultVar AsyncResult) bool {
1976		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
1977	}
1978}
1979
1980// OverrideMakeSymbolicLink sets the "make_symbolic_link" callback function.
1981// Makes a symbolic link. %NULL if symbolic
1982//
1983//	links are unsupported.
1984func (x *FileIface) OverrideMakeSymbolicLink(cb func(File, string, *Cancellable) bool) {
1985	if cb == nil {
1986		x.xMakeSymbolicLink = 0
1987	} else {
1988		x.xMakeSymbolicLink = purego.NewCallback(func(FileVarp uintptr, SymlinkValueVarp string, CancellableVarp uintptr) bool {
1989			return cb(&FileBase{Ptr: FileVarp}, SymlinkValueVarp, CancellableNewFromInternalPtr(CancellableVarp))
1990		})
1991	}
1992}
1993
1994// GetMakeSymbolicLink gets the "make_symbolic_link" callback function.
1995// Makes a symbolic link. %NULL if symbolic
1996//
1997//	links are unsupported.
1998func (x *FileIface) GetMakeSymbolicLink() func(File, string, *Cancellable) bool {
1999	if x.xMakeSymbolicLink == 0 {
2000		return nil
2001	}
2002	var rawCallback func(FileVarp uintptr, SymlinkValueVarp string, CancellableVarp uintptr) bool
2003	purego.RegisterFunc(&rawCallback, x.xMakeSymbolicLink)
2004	return func(FileVar File, SymlinkValueVar string, CancellableVar *Cancellable) bool {
2005		return rawCallback(FileVar.GoPointer(), SymlinkValueVar, CancellableVar.GoPointer())
2006	}
2007}
2008
2009// OverrideMakeSymbolicLinkAsync sets the "make_symbolic_link_async" callback function.
2010// Asynchronously makes a symbolic link
2011func (x *FileIface) OverrideMakeSymbolicLinkAsync(cb func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
2012	if cb == nil {
2013		x.xMakeSymbolicLinkAsync = 0
2014	} else {
2015		x.xMakeSymbolicLinkAsync = purego.NewCallback(func(FileVarp uintptr, SymlinkValueVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2016			cb(&FileBase{Ptr: FileVarp}, SymlinkValueVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2017		})
2018	}
2019}
2020
2021// GetMakeSymbolicLinkAsync gets the "make_symbolic_link_async" callback function.
2022// Asynchronously makes a symbolic link
2023func (x *FileIface) GetMakeSymbolicLinkAsync() func(File, string, int, *Cancellable, *AsyncReadyCallback, uintptr) {
2024	if x.xMakeSymbolicLinkAsync == 0 {
2025		return nil
2026	}
2027	var rawCallback func(FileVarp uintptr, SymlinkValueVarp string, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2028	purego.RegisterFunc(&rawCallback, x.xMakeSymbolicLinkAsync)
2029	return func(FileVar File, SymlinkValueVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2030		rawCallback(FileVar.GoPointer(), SymlinkValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2031	}
2032}
2033
2034// OverrideMakeSymbolicLinkFinish sets the "make_symbolic_link_finish" callback function.
2035// Finishes making a symbolic link asynchronously.
2036func (x *FileIface) OverrideMakeSymbolicLinkFinish(cb func(File, AsyncResult) bool) {
2037	if cb == nil {
2038		x.xMakeSymbolicLinkFinish = 0
2039	} else {
2040		x.xMakeSymbolicLinkFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2041			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2042		})
2043	}
2044}
2045
2046// GetMakeSymbolicLinkFinish gets the "make_symbolic_link_finish" callback function.
2047// Finishes making a symbolic link asynchronously.
2048func (x *FileIface) GetMakeSymbolicLinkFinish() func(File, AsyncResult) bool {
2049	if x.xMakeSymbolicLinkFinish == 0 {
2050		return nil
2051	}
2052	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2053	purego.RegisterFunc(&rawCallback, x.xMakeSymbolicLinkFinish)
2054	return func(FileVar File, ResultVar AsyncResult) bool {
2055		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2056	}
2057}
2058
2059// OverrideCopy sets the "copy" callback function.
2060// Copies a file. %NULL if copying is unsupported, which will
2061//
2062//	cause `GFile` to use a fallback copy method where it reads from the
2063//	source and writes to the destination.
2064func (x *FileIface) OverrideCopy(cb func(File, File, FileCopyFlags, *Cancellable, *FileProgressCallback, uintptr) bool) {
2065	if cb == nil {
2066		x.xCopy = 0
2067	} else {
2068		x.xCopy = purego.NewCallback(func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr) bool {
2069			return cb(&FileBase{Ptr: SourceVarp}, &FileBase{Ptr: DestinationVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressCallbackDataVarp)
2070		})
2071	}
2072}
2073
2074// GetCopy gets the "copy" callback function.
2075// Copies a file. %NULL if copying is unsupported, which will
2076//
2077//	cause `GFile` to use a fallback copy method where it reads from the
2078//	source and writes to the destination.
2079func (x *FileIface) GetCopy() func(File, File, FileCopyFlags, *Cancellable, *FileProgressCallback, uintptr) bool {
2080	if x.xCopy == 0 {
2081		return nil
2082	}
2083	var rawCallback func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr) bool
2084	purego.RegisterFunc(&rawCallback, x.xCopy)
2085	return func(SourceVar File, DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) bool {
2086		return rawCallback(SourceVar.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar)
2087	}
2088}
2089
2090// OverrideCopyAsync sets the "copy_async" callback function.
2091// Asynchronously copies a file.
2092func (x *FileIface) OverrideCopyAsync(cb func(File, File, FileCopyFlags, int, *Cancellable, *FileProgressCallback, uintptr, *AsyncReadyCallback, uintptr)) {
2093	if cb == nil {
2094		x.xCopyAsync = 0
2095	} else {
2096		x.xCopyAsync = purego.NewCallback(func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2097			cb(&FileBase{Ptr: SourceVarp}, &FileBase{Ptr: DestinationVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressCallbackDataVarp, (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2098		})
2099	}
2100}
2101
2102// GetCopyAsync gets the "copy_async" callback function.
2103// Asynchronously copies a file.
2104func (x *FileIface) GetCopyAsync() func(File, File, FileCopyFlags, int, *Cancellable, *FileProgressCallback, uintptr, *AsyncReadyCallback, uintptr) {
2105	if x.xCopyAsync == 0 {
2106		return nil
2107	}
2108	var rawCallback func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2109	purego.RegisterFunc(&rawCallback, x.xCopyAsync)
2110	return func(SourceVar File, DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2111		rawCallback(SourceVar.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
2112	}
2113}
2114
2115// OverrideCopyFinish sets the "copy_finish" callback function.
2116// Finishes an asynchronous copy operation.
2117func (x *FileIface) OverrideCopyFinish(cb func(File, AsyncResult) bool) {
2118	if cb == nil {
2119		x.xCopyFinish = 0
2120	} else {
2121		x.xCopyFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) bool {
2122			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
2123		})
2124	}
2125}
2126
2127// GetCopyFinish gets the "copy_finish" callback function.
2128// Finishes an asynchronous copy operation.
2129func (x *FileIface) GetCopyFinish() func(File, AsyncResult) bool {
2130	if x.xCopyFinish == 0 {
2131		return nil
2132	}
2133	var rawCallback func(FileVarp uintptr, ResVarp uintptr) bool
2134	purego.RegisterFunc(&rawCallback, x.xCopyFinish)
2135	return func(FileVar File, ResVar AsyncResult) bool {
2136		return rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
2137	}
2138}
2139
2140// OverrideMove sets the "move" callback function.
2141// Moves a file.
2142func (x *FileIface) OverrideMove(cb func(File, File, FileCopyFlags, *Cancellable, *FileProgressCallback, uintptr) bool) {
2143	if cb == nil {
2144		x.xMove = 0
2145	} else {
2146		x.xMove = purego.NewCallback(func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr) bool {
2147			return cb(&FileBase{Ptr: SourceVarp}, &FileBase{Ptr: DestinationVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressCallbackDataVarp)
2148		})
2149	}
2150}
2151
2152// GetMove gets the "move" callback function.
2153// Moves a file.
2154func (x *FileIface) GetMove() func(File, File, FileCopyFlags, *Cancellable, *FileProgressCallback, uintptr) bool {
2155	if x.xMove == 0 {
2156		return nil
2157	}
2158	var rawCallback func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr) bool
2159	purego.RegisterFunc(&rawCallback, x.xMove)
2160	return func(SourceVar File, DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) bool {
2161		return rawCallback(SourceVar.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar)
2162	}
2163}
2164
2165// OverrideMoveAsync sets the "move_async" callback function.
2166// Asynchronously moves a file. Since: 2.72
2167func (x *FileIface) OverrideMoveAsync(cb func(File, File, FileCopyFlags, int, *Cancellable, *FileProgressCallback, uintptr, *AsyncReadyCallback, uintptr)) {
2168	if cb == nil {
2169		x.xMoveAsync = 0
2170	} else {
2171		x.xMoveAsync = purego.NewCallback(func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2172			cb(&FileBase{Ptr: SourceVarp}, &FileBase{Ptr: DestinationVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressCallbackDataVarp, (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2173		})
2174	}
2175}
2176
2177// GetMoveAsync gets the "move_async" callback function.
2178// Asynchronously moves a file. Since: 2.72
2179func (x *FileIface) GetMoveAsync() func(File, File, FileCopyFlags, int, *Cancellable, *FileProgressCallback, uintptr, *AsyncReadyCallback, uintptr) {
2180	if x.xMoveAsync == 0 {
2181		return nil
2182	}
2183	var rawCallback func(SourceVarp uintptr, DestinationVarp uintptr, FlagsVarp FileCopyFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressCallbackDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2184	purego.RegisterFunc(&rawCallback, x.xMoveAsync)
2185	return func(SourceVar File, DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2186		rawCallback(SourceVar.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
2187	}
2188}
2189
2190// OverrideMoveFinish sets the "move_finish" callback function.
2191// Finishes an asynchronous move operation. Since: 2.72
2192func (x *FileIface) OverrideMoveFinish(cb func(File, AsyncResult) bool) {
2193	if cb == nil {
2194		x.xMoveFinish = 0
2195	} else {
2196		x.xMoveFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2197			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2198		})
2199	}
2200}
2201
2202// GetMoveFinish gets the "move_finish" callback function.
2203// Finishes an asynchronous move operation. Since: 2.72
2204func (x *FileIface) GetMoveFinish() func(File, AsyncResult) bool {
2205	if x.xMoveFinish == 0 {
2206		return nil
2207	}
2208	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2209	purego.RegisterFunc(&rawCallback, x.xMoveFinish)
2210	return func(FileVar File, ResultVar AsyncResult) bool {
2211		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2212	}
2213}
2214
2215// OverrideMountMountable sets the "mount_mountable" callback function.
2216// Mounts a mountable object.
2217func (x *FileIface) OverrideMountMountable(cb func(File, MountMountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2218	if cb == nil {
2219		x.xMountMountable = 0
2220	} else {
2221		x.xMountMountable = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountMountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2222			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, MountOperationNewFromInternalPtr(MountOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2223		})
2224	}
2225}
2226
2227// GetMountMountable gets the "mount_mountable" callback function.
2228// Mounts a mountable object.
2229func (x *FileIface) GetMountMountable() func(File, MountMountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2230	if x.xMountMountable == 0 {
2231		return nil
2232	}
2233	var rawCallback func(FileVarp uintptr, FlagsVarp MountMountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2234	purego.RegisterFunc(&rawCallback, x.xMountMountable)
2235	return func(FileVar File, FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2236		rawCallback(FileVar.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2237	}
2238}
2239
2240// OverrideMountMountableFinish sets the "mount_mountable_finish" callback function.
2241// Finishes a mounting operation.
2242func (x *FileIface) OverrideMountMountableFinish(cb func(File, AsyncResult) *FileBase) {
2243	if cb == nil {
2244		x.xMountMountableFinish = 0
2245	} else {
2246		x.xMountMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) uintptr {
2247			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2248			if ret == nil {
2249				return 0
2250			}
2251			return ret.GoPointer()
2252		})
2253	}
2254}
2255
2256// GetMountMountableFinish gets the "mount_mountable_finish" callback function.
2257// Finishes a mounting operation.
2258func (x *FileIface) GetMountMountableFinish() func(File, AsyncResult) *FileBase {
2259	if x.xMountMountableFinish == 0 {
2260		return nil
2261	}
2262	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) uintptr
2263	purego.RegisterFunc(&rawCallback, x.xMountMountableFinish)
2264	return func(FileVar File, ResultVar AsyncResult) *FileBase {
2265		rawRet := rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2266		if rawRet == 0 {
2267			return nil
2268		}
2269		ret := &FileBase{}
2270		ret.Ptr = rawRet
2271		return ret
2272	}
2273}
2274
2275// OverrideUnmountMountable sets the "unmount_mountable" callback function.
2276// Unmounts a mountable object.
2277func (x *FileIface) OverrideUnmountMountable(cb func(File, MountUnmountFlags, *Cancellable, *AsyncReadyCallback, uintptr)) {
2278	if cb == nil {
2279		x.xUnmountMountable = 0
2280	} else {
2281		x.xUnmountMountable = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountUnmountFlags, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2282			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2283		})
2284	}
2285}
2286
2287// GetUnmountMountable gets the "unmount_mountable" callback function.
2288// Unmounts a mountable object.
2289func (x *FileIface) GetUnmountMountable() func(File, MountUnmountFlags, *Cancellable, *AsyncReadyCallback, uintptr) {
2290	if x.xUnmountMountable == 0 {
2291		return nil
2292	}
2293	var rawCallback func(FileVarp uintptr, FlagsVarp MountUnmountFlags, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2294	purego.RegisterFunc(&rawCallback, x.xUnmountMountable)
2295	return func(FileVar File, FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2296		rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2297	}
2298}
2299
2300// OverrideUnmountMountableFinish sets the "unmount_mountable_finish" callback function.
2301// Finishes an unmount operation.
2302func (x *FileIface) OverrideUnmountMountableFinish(cb func(File, AsyncResult) bool) {
2303	if cb == nil {
2304		x.xUnmountMountableFinish = 0
2305	} else {
2306		x.xUnmountMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2307			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2308		})
2309	}
2310}
2311
2312// GetUnmountMountableFinish gets the "unmount_mountable_finish" callback function.
2313// Finishes an unmount operation.
2314func (x *FileIface) GetUnmountMountableFinish() func(File, AsyncResult) bool {
2315	if x.xUnmountMountableFinish == 0 {
2316		return nil
2317	}
2318	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2319	purego.RegisterFunc(&rawCallback, x.xUnmountMountableFinish)
2320	return func(FileVar File, ResultVar AsyncResult) bool {
2321		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2322	}
2323}
2324
2325// OverrideEjectMountable sets the "eject_mountable" callback function.
2326// Ejects a mountable.
2327func (x *FileIface) OverrideEjectMountable(cb func(File, MountUnmountFlags, *Cancellable, *AsyncReadyCallback, uintptr)) {
2328	if cb == nil {
2329		x.xEjectMountable = 0
2330	} else {
2331		x.xEjectMountable = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountUnmountFlags, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2332			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2333		})
2334	}
2335}
2336
2337// GetEjectMountable gets the "eject_mountable" callback function.
2338// Ejects a mountable.
2339func (x *FileIface) GetEjectMountable() func(File, MountUnmountFlags, *Cancellable, *AsyncReadyCallback, uintptr) {
2340	if x.xEjectMountable == 0 {
2341		return nil
2342	}
2343	var rawCallback func(FileVarp uintptr, FlagsVarp MountUnmountFlags, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2344	purego.RegisterFunc(&rawCallback, x.xEjectMountable)
2345	return func(FileVar File, FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2346		rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2347	}
2348}
2349
2350// OverrideEjectMountableFinish sets the "eject_mountable_finish" callback function.
2351// Finishes an eject operation.
2352func (x *FileIface) OverrideEjectMountableFinish(cb func(File, AsyncResult) bool) {
2353	if cb == nil {
2354		x.xEjectMountableFinish = 0
2355	} else {
2356		x.xEjectMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2357			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2358		})
2359	}
2360}
2361
2362// GetEjectMountableFinish gets the "eject_mountable_finish" callback function.
2363// Finishes an eject operation.
2364func (x *FileIface) GetEjectMountableFinish() func(File, AsyncResult) bool {
2365	if x.xEjectMountableFinish == 0 {
2366		return nil
2367	}
2368	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2369	purego.RegisterFunc(&rawCallback, x.xEjectMountableFinish)
2370	return func(FileVar File, ResultVar AsyncResult) bool {
2371		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2372	}
2373}
2374
2375// OverrideMountEnclosingVolume sets the "mount_enclosing_volume" callback function.
2376// Mounts a specified location.
2377func (x *FileIface) OverrideMountEnclosingVolume(cb func(File, MountMountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2378	if cb == nil {
2379		x.xMountEnclosingVolume = 0
2380	} else {
2381		x.xMountEnclosingVolume = purego.NewCallback(func(LocationVarp uintptr, FlagsVarp MountMountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2382			cb(&FileBase{Ptr: LocationVarp}, FlagsVarp, MountOperationNewFromInternalPtr(MountOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2383		})
2384	}
2385}
2386
2387// GetMountEnclosingVolume gets the "mount_enclosing_volume" callback function.
2388// Mounts a specified location.
2389func (x *FileIface) GetMountEnclosingVolume() func(File, MountMountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2390	if x.xMountEnclosingVolume == 0 {
2391		return nil
2392	}
2393	var rawCallback func(LocationVarp uintptr, FlagsVarp MountMountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2394	purego.RegisterFunc(&rawCallback, x.xMountEnclosingVolume)
2395	return func(LocationVar File, FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2396		rawCallback(LocationVar.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2397	}
2398}
2399
2400// OverrideMountEnclosingVolumeFinish sets the "mount_enclosing_volume_finish" callback function.
2401// Finishes mounting a specified location.
2402func (x *FileIface) OverrideMountEnclosingVolumeFinish(cb func(File, AsyncResult) bool) {
2403	if cb == nil {
2404		x.xMountEnclosingVolumeFinish = 0
2405	} else {
2406		x.xMountEnclosingVolumeFinish = purego.NewCallback(func(LocationVarp uintptr, ResultVarp uintptr) bool {
2407			return cb(&FileBase{Ptr: LocationVarp}, &AsyncResultBase{Ptr: ResultVarp})
2408		})
2409	}
2410}
2411
2412// GetMountEnclosingVolumeFinish gets the "mount_enclosing_volume_finish" callback function.
2413// Finishes mounting a specified location.
2414func (x *FileIface) GetMountEnclosingVolumeFinish() func(File, AsyncResult) bool {
2415	if x.xMountEnclosingVolumeFinish == 0 {
2416		return nil
2417	}
2418	var rawCallback func(LocationVarp uintptr, ResultVarp uintptr) bool
2419	purego.RegisterFunc(&rawCallback, x.xMountEnclosingVolumeFinish)
2420	return func(LocationVar File, ResultVar AsyncResult) bool {
2421		return rawCallback(LocationVar.GoPointer(), ResultVar.GoPointer())
2422	}
2423}
2424
2425// OverrideMonitorDir sets the "monitor_dir" callback function.
2426// Creates a #GFileMonitor for the location.
2427func (x *FileIface) OverrideMonitorDir(cb func(File, FileMonitorFlags, *Cancellable) *FileMonitor) {
2428	if cb == nil {
2429		x.xMonitorDir = 0
2430	} else {
2431		x.xMonitorDir = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileMonitorFlags, CancellableVarp uintptr) uintptr {
2432			ret := cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
2433			if ret == nil {
2434				return 0
2435			}
2436			return ret.GoPointer()
2437		})
2438	}
2439}
2440
2441// GetMonitorDir gets the "monitor_dir" callback function.
2442// Creates a #GFileMonitor for the location.
2443func (x *FileIface) GetMonitorDir() func(File, FileMonitorFlags, *Cancellable) *FileMonitor {
2444	if x.xMonitorDir == 0 {
2445		return nil
2446	}
2447	var rawCallback func(FileVarp uintptr, FlagsVarp FileMonitorFlags, CancellableVarp uintptr) uintptr
2448	purego.RegisterFunc(&rawCallback, x.xMonitorDir)
2449	return func(FileVar File, FlagsVar FileMonitorFlags, CancellableVar *Cancellable) *FileMonitor {
2450		rawRet := rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
2451		if rawRet == 0 {
2452			return nil
2453		}
2454		ret := &FileMonitor{}
2455		ret.Ptr = rawRet
2456		return ret
2457	}
2458}
2459
2460// OverrideMonitorFile sets the "monitor_file" callback function.
2461// Creates a #GFileMonitor for the location.
2462func (x *FileIface) OverrideMonitorFile(cb func(File, FileMonitorFlags, *Cancellable) *FileMonitor) {
2463	if cb == nil {
2464		x.xMonitorFile = 0
2465	} else {
2466		x.xMonitorFile = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileMonitorFlags, CancellableVarp uintptr) uintptr {
2467			ret := cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
2468			if ret == nil {
2469				return 0
2470			}
2471			return ret.GoPointer()
2472		})
2473	}
2474}
2475
2476// GetMonitorFile gets the "monitor_file" callback function.
2477// Creates a #GFileMonitor for the location.
2478func (x *FileIface) GetMonitorFile() func(File, FileMonitorFlags, *Cancellable) *FileMonitor {
2479	if x.xMonitorFile == 0 {
2480		return nil
2481	}
2482	var rawCallback func(FileVarp uintptr, FlagsVarp FileMonitorFlags, CancellableVarp uintptr) uintptr
2483	purego.RegisterFunc(&rawCallback, x.xMonitorFile)
2484	return func(FileVar File, FlagsVar FileMonitorFlags, CancellableVar *Cancellable) *FileMonitor {
2485		rawRet := rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
2486		if rawRet == 0 {
2487			return nil
2488		}
2489		ret := &FileMonitor{}
2490		ret.Ptr = rawRet
2491		return ret
2492	}
2493}
2494
2495// OverrideOpenReadwrite sets the "open_readwrite" callback function.
2496// Open file read/write. Since 2.22.
2497func (x *FileIface) OverrideOpenReadwrite(cb func(File, *Cancellable) *FileIOStream) {
2498	if cb == nil {
2499		x.xOpenReadwrite = 0
2500	} else {
2501		x.xOpenReadwrite = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) uintptr {
2502			ret := cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
2503			if ret == nil {
2504				return 0
2505			}
2506			return ret.GoPointer()
2507		})
2508	}
2509}
2510
2511// GetOpenReadwrite gets the "open_readwrite" callback function.
2512// Open file read/write. Since 2.22.
2513func (x *FileIface) GetOpenReadwrite() func(File, *Cancellable) *FileIOStream {
2514	if x.xOpenReadwrite == 0 {
2515		return nil
2516	}
2517	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) uintptr
2518	purego.RegisterFunc(&rawCallback, x.xOpenReadwrite)
2519	return func(FileVar File, CancellableVar *Cancellable) *FileIOStream {
2520		rawRet := rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
2521		if rawRet == 0 {
2522			return nil
2523		}
2524		ret := &FileIOStream{}
2525		ret.Ptr = rawRet
2526		return ret
2527	}
2528}
2529
2530// OverrideOpenReadwriteAsync sets the "open_readwrite_async" callback function.
2531// Asynchronously opens file read/write. Since 2.22.
2532func (x *FileIface) OverrideOpenReadwriteAsync(cb func(File, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
2533	if cb == nil {
2534		x.xOpenReadwriteAsync = 0
2535	} else {
2536		x.xOpenReadwriteAsync = purego.NewCallback(func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2537			cb(&FileBase{Ptr: FileVarp}, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2538		})
2539	}
2540}
2541
2542// GetOpenReadwriteAsync gets the "open_readwrite_async" callback function.
2543// Asynchronously opens file read/write. Since 2.22.
2544func (x *FileIface) GetOpenReadwriteAsync() func(File, int, *Cancellable, *AsyncReadyCallback, uintptr) {
2545	if x.xOpenReadwriteAsync == 0 {
2546		return nil
2547	}
2548	var rawCallback func(FileVarp uintptr, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2549	purego.RegisterFunc(&rawCallback, x.xOpenReadwriteAsync)
2550	return func(FileVar File, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2551		rawCallback(FileVar.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2552	}
2553}
2554
2555// OverrideOpenReadwriteFinish sets the "open_readwrite_finish" callback function.
2556// Finishes an asynchronous open read/write. Since 2.22.
2557func (x *FileIface) OverrideOpenReadwriteFinish(cb func(File, AsyncResult) *FileIOStream) {
2558	if cb == nil {
2559		x.xOpenReadwriteFinish = 0
2560	} else {
2561		x.xOpenReadwriteFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
2562			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
2563			if ret == nil {
2564				return 0
2565			}
2566			return ret.GoPointer()
2567		})
2568	}
2569}
2570
2571// GetOpenReadwriteFinish gets the "open_readwrite_finish" callback function.
2572// Finishes an asynchronous open read/write. Since 2.22.
2573func (x *FileIface) GetOpenReadwriteFinish() func(File, AsyncResult) *FileIOStream {
2574	if x.xOpenReadwriteFinish == 0 {
2575		return nil
2576	}
2577	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
2578	purego.RegisterFunc(&rawCallback, x.xOpenReadwriteFinish)
2579	return func(FileVar File, ResVar AsyncResult) *FileIOStream {
2580		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
2581		if rawRet == 0 {
2582			return nil
2583		}
2584		ret := &FileIOStream{}
2585		ret.Ptr = rawRet
2586		return ret
2587	}
2588}
2589
2590// OverrideCreateReadwrite sets the "create_readwrite" callback function.
2591// Creates file read/write. Since 2.22.
2592func (x *FileIface) OverrideCreateReadwrite(cb func(File, FileCreateFlags, *Cancellable) *FileIOStream) {
2593	if cb == nil {
2594		x.xCreateReadwrite = 0
2595	} else {
2596		x.xCreateReadwrite = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr {
2597			ret := cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
2598			if ret == nil {
2599				return 0
2600			}
2601			return ret.GoPointer()
2602		})
2603	}
2604}
2605
2606// GetCreateReadwrite gets the "create_readwrite" callback function.
2607// Creates file read/write. Since 2.22.
2608func (x *FileIface) GetCreateReadwrite() func(File, FileCreateFlags, *Cancellable) *FileIOStream {
2609	if x.xCreateReadwrite == 0 {
2610		return nil
2611	}
2612	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr
2613	purego.RegisterFunc(&rawCallback, x.xCreateReadwrite)
2614	return func(FileVar File, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileIOStream {
2615		rawRet := rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())
2616		if rawRet == 0 {
2617			return nil
2618		}
2619		ret := &FileIOStream{}
2620		ret.Ptr = rawRet
2621		return ret
2622	}
2623}
2624
2625// OverrideCreateReadwriteAsync sets the "create_readwrite_async" callback function.
2626// Asynchronously creates file read/write. Since 2.22.
2627func (x *FileIface) OverrideCreateReadwriteAsync(cb func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
2628	if cb == nil {
2629		x.xCreateReadwriteAsync = 0
2630	} else {
2631		x.xCreateReadwriteAsync = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2632			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2633		})
2634	}
2635}
2636
2637// GetCreateReadwriteAsync gets the "create_readwrite_async" callback function.
2638// Asynchronously creates file read/write. Since 2.22.
2639func (x *FileIface) GetCreateReadwriteAsync() func(File, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
2640	if x.xCreateReadwriteAsync == 0 {
2641		return nil
2642	}
2643	var rawCallback func(FileVarp uintptr, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2644	purego.RegisterFunc(&rawCallback, x.xCreateReadwriteAsync)
2645	return func(FileVar File, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2646		rawCallback(FileVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2647	}
2648}
2649
2650// OverrideCreateReadwriteFinish sets the "create_readwrite_finish" callback function.
2651// Finishes an asynchronous creates read/write. Since 2.22.
2652func (x *FileIface) OverrideCreateReadwriteFinish(cb func(File, AsyncResult) *FileIOStream) {
2653	if cb == nil {
2654		x.xCreateReadwriteFinish = 0
2655	} else {
2656		x.xCreateReadwriteFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
2657			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
2658			if ret == nil {
2659				return 0
2660			}
2661			return ret.GoPointer()
2662		})
2663	}
2664}
2665
2666// GetCreateReadwriteFinish gets the "create_readwrite_finish" callback function.
2667// Finishes an asynchronous creates read/write. Since 2.22.
2668func (x *FileIface) GetCreateReadwriteFinish() func(File, AsyncResult) *FileIOStream {
2669	if x.xCreateReadwriteFinish == 0 {
2670		return nil
2671	}
2672	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
2673	purego.RegisterFunc(&rawCallback, x.xCreateReadwriteFinish)
2674	return func(FileVar File, ResVar AsyncResult) *FileIOStream {
2675		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
2676		if rawRet == 0 {
2677			return nil
2678		}
2679		ret := &FileIOStream{}
2680		ret.Ptr = rawRet
2681		return ret
2682	}
2683}
2684
2685// OverrideReplaceReadwrite sets the "replace_readwrite" callback function.
2686// Replaces file read/write. Since 2.22.
2687func (x *FileIface) OverrideReplaceReadwrite(cb func(File, string, bool, FileCreateFlags, *Cancellable) *FileIOStream) {
2688	if cb == nil {
2689		x.xReplaceReadwrite = 0
2690	} else {
2691		x.xReplaceReadwrite = purego.NewCallback(func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr {
2692			ret := cb(&FileBase{Ptr: FileVarp}, EtagVarp, MakeBackupVarp, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp))
2693			if ret == nil {
2694				return 0
2695			}
2696			return ret.GoPointer()
2697		})
2698	}
2699}
2700
2701// GetReplaceReadwrite gets the "replace_readwrite" callback function.
2702// Replaces file read/write. Since 2.22.
2703func (x *FileIface) GetReplaceReadwrite() func(File, string, bool, FileCreateFlags, *Cancellable) *FileIOStream {
2704	if x.xReplaceReadwrite == 0 {
2705		return nil
2706	}
2707	var rawCallback func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, CancellableVarp uintptr) uintptr
2708	purego.RegisterFunc(&rawCallback, x.xReplaceReadwrite)
2709	return func(FileVar File, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileIOStream {
2710		rawRet := rawCallback(FileVar.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer())
2711		if rawRet == 0 {
2712			return nil
2713		}
2714		ret := &FileIOStream{}
2715		ret.Ptr = rawRet
2716		return ret
2717	}
2718}
2719
2720// OverrideReplaceReadwriteAsync sets the "replace_readwrite_async" callback function.
2721// Asynchronously replaces file read/write. Since 2.22.
2722func (x *FileIface) OverrideReplaceReadwriteAsync(cb func(File, string, bool, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
2723	if cb == nil {
2724		x.xReplaceReadwriteAsync = 0
2725	} else {
2726		x.xReplaceReadwriteAsync = purego.NewCallback(func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2727			cb(&FileBase{Ptr: FileVarp}, EtagVarp, MakeBackupVarp, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2728		})
2729	}
2730}
2731
2732// GetReplaceReadwriteAsync gets the "replace_readwrite_async" callback function.
2733// Asynchronously replaces file read/write. Since 2.22.
2734func (x *FileIface) GetReplaceReadwriteAsync() func(File, string, bool, FileCreateFlags, int, *Cancellable, *AsyncReadyCallback, uintptr) {
2735	if x.xReplaceReadwriteAsync == 0 {
2736		return nil
2737	}
2738	var rawCallback func(FileVarp uintptr, EtagVarp string, MakeBackupVarp bool, FlagsVarp FileCreateFlags, IoPriorityVarp int, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2739	purego.RegisterFunc(&rawCallback, x.xReplaceReadwriteAsync)
2740	return func(FileVar File, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2741		rawCallback(FileVar.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2742	}
2743}
2744
2745// OverrideReplaceReadwriteFinish sets the "replace_readwrite_finish" callback function.
2746// Finishes an asynchronous replace read/write. Since 2.22.
2747func (x *FileIface) OverrideReplaceReadwriteFinish(cb func(File, AsyncResult) *FileIOStream) {
2748	if cb == nil {
2749		x.xReplaceReadwriteFinish = 0
2750	} else {
2751		x.xReplaceReadwriteFinish = purego.NewCallback(func(FileVarp uintptr, ResVarp uintptr) uintptr {
2752			ret := cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResVarp})
2753			if ret == nil {
2754				return 0
2755			}
2756			return ret.GoPointer()
2757		})
2758	}
2759}
2760
2761// GetReplaceReadwriteFinish gets the "replace_readwrite_finish" callback function.
2762// Finishes an asynchronous replace read/write. Since 2.22.
2763func (x *FileIface) GetReplaceReadwriteFinish() func(File, AsyncResult) *FileIOStream {
2764	if x.xReplaceReadwriteFinish == 0 {
2765		return nil
2766	}
2767	var rawCallback func(FileVarp uintptr, ResVarp uintptr) uintptr
2768	purego.RegisterFunc(&rawCallback, x.xReplaceReadwriteFinish)
2769	return func(FileVar File, ResVar AsyncResult) *FileIOStream {
2770		rawRet := rawCallback(FileVar.GoPointer(), ResVar.GoPointer())
2771		if rawRet == 0 {
2772			return nil
2773		}
2774		ret := &FileIOStream{}
2775		ret.Ptr = rawRet
2776		return ret
2777	}
2778}
2779
2780// OverrideStartMountable sets the "start_mountable" callback function.
2781// Starts a mountable object. Since 2.22.
2782func (x *FileIface) OverrideStartMountable(cb func(File, DriveStartFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2783	if cb == nil {
2784		x.xStartMountable = 0
2785	} else {
2786		x.xStartMountable = purego.NewCallback(func(FileVarp uintptr, FlagsVarp DriveStartFlags, StartOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2787			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, MountOperationNewFromInternalPtr(StartOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2788		})
2789	}
2790}
2791
2792// GetStartMountable gets the "start_mountable" callback function.
2793// Starts a mountable object. Since 2.22.
2794func (x *FileIface) GetStartMountable() func(File, DriveStartFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2795	if x.xStartMountable == 0 {
2796		return nil
2797	}
2798	var rawCallback func(FileVarp uintptr, FlagsVarp DriveStartFlags, StartOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2799	purego.RegisterFunc(&rawCallback, x.xStartMountable)
2800	return func(FileVar File, FlagsVar DriveStartFlags, StartOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2801		rawCallback(FileVar.GoPointer(), FlagsVar, StartOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2802	}
2803}
2804
2805// OverrideStartMountableFinish sets the "start_mountable_finish" callback function.
2806// Finishes a start operation. Since 2.22.
2807func (x *FileIface) OverrideStartMountableFinish(cb func(File, AsyncResult) bool) {
2808	if cb == nil {
2809		x.xStartMountableFinish = 0
2810	} else {
2811		x.xStartMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2812			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2813		})
2814	}
2815}
2816
2817// GetStartMountableFinish gets the "start_mountable_finish" callback function.
2818// Finishes a start operation. Since 2.22.
2819func (x *FileIface) GetStartMountableFinish() func(File, AsyncResult) bool {
2820	if x.xStartMountableFinish == 0 {
2821		return nil
2822	}
2823	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2824	purego.RegisterFunc(&rawCallback, x.xStartMountableFinish)
2825	return func(FileVar File, ResultVar AsyncResult) bool {
2826		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2827	}
2828}
2829
2830// OverrideStopMountable sets the "stop_mountable" callback function.
2831// Stops a mountable. Since 2.22.
2832func (x *FileIface) OverrideStopMountable(cb func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2833	if cb == nil {
2834		x.xStopMountable = 0
2835	} else {
2836		x.xStopMountable = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2837			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, MountOperationNewFromInternalPtr(MountOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2838		})
2839	}
2840}
2841
2842// GetStopMountable gets the "stop_mountable" callback function.
2843// Stops a mountable. Since 2.22.
2844func (x *FileIface) GetStopMountable() func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2845	if x.xStopMountable == 0 {
2846		return nil
2847	}
2848	var rawCallback func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2849	purego.RegisterFunc(&rawCallback, x.xStopMountable)
2850	return func(FileVar File, FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2851		rawCallback(FileVar.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2852	}
2853}
2854
2855// OverrideStopMountableFinish sets the "stop_mountable_finish" callback function.
2856// Finishes a stop operation. Since 2.22.
2857func (x *FileIface) OverrideStopMountableFinish(cb func(File, AsyncResult) bool) {
2858	if cb == nil {
2859		x.xStopMountableFinish = 0
2860	} else {
2861		x.xStopMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2862			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2863		})
2864	}
2865}
2866
2867// GetStopMountableFinish gets the "stop_mountable_finish" callback function.
2868// Finishes a stop operation. Since 2.22.
2869func (x *FileIface) GetStopMountableFinish() func(File, AsyncResult) bool {
2870	if x.xStopMountableFinish == 0 {
2871		return nil
2872	}
2873	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2874	purego.RegisterFunc(&rawCallback, x.xStopMountableFinish)
2875	return func(FileVar File, ResultVar AsyncResult) bool {
2876		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2877	}
2878}
2879
2880// OverrideUnmountMountableWithOperation sets the "unmount_mountable_with_operation" callback function.
2881// Unmounts a mountable object using a #GMountOperation. Since 2.22.
2882func (x *FileIface) OverrideUnmountMountableWithOperation(cb func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2883	if cb == nil {
2884		x.xUnmountMountableWithOperation = 0
2885	} else {
2886		x.xUnmountMountableWithOperation = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2887			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, MountOperationNewFromInternalPtr(MountOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2888		})
2889	}
2890}
2891
2892// GetUnmountMountableWithOperation gets the "unmount_mountable_with_operation" callback function.
2893// Unmounts a mountable object using a #GMountOperation. Since 2.22.
2894func (x *FileIface) GetUnmountMountableWithOperation() func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2895	if x.xUnmountMountableWithOperation == 0 {
2896		return nil
2897	}
2898	var rawCallback func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2899	purego.RegisterFunc(&rawCallback, x.xUnmountMountableWithOperation)
2900	return func(FileVar File, FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2901		rawCallback(FileVar.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2902	}
2903}
2904
2905// OverrideUnmountMountableWithOperationFinish sets the "unmount_mountable_with_operation_finish" callback function.
2906// Finishes an unmount operation using a #GMountOperation. Since 2.22.
2907func (x *FileIface) OverrideUnmountMountableWithOperationFinish(cb func(File, AsyncResult) bool) {
2908	if cb == nil {
2909		x.xUnmountMountableWithOperationFinish = 0
2910	} else {
2911		x.xUnmountMountableWithOperationFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2912			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2913		})
2914	}
2915}
2916
2917// GetUnmountMountableWithOperationFinish gets the "unmount_mountable_with_operation_finish" callback function.
2918// Finishes an unmount operation using a #GMountOperation. Since 2.22.
2919func (x *FileIface) GetUnmountMountableWithOperationFinish() func(File, AsyncResult) bool {
2920	if x.xUnmountMountableWithOperationFinish == 0 {
2921		return nil
2922	}
2923	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2924	purego.RegisterFunc(&rawCallback, x.xUnmountMountableWithOperationFinish)
2925	return func(FileVar File, ResultVar AsyncResult) bool {
2926		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2927	}
2928}
2929
2930// OverrideEjectMountableWithOperation sets the "eject_mountable_with_operation" callback function.
2931// Ejects a mountable object using a #GMountOperation. Since 2.22.
2932func (x *FileIface) OverrideEjectMountableWithOperation(cb func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr)) {
2933	if cb == nil {
2934		x.xEjectMountableWithOperation = 0
2935	} else {
2936		x.xEjectMountableWithOperation = purego.NewCallback(func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2937			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, MountOperationNewFromInternalPtr(MountOperationVarp), CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2938		})
2939	}
2940}
2941
2942// GetEjectMountableWithOperation gets the "eject_mountable_with_operation" callback function.
2943// Ejects a mountable object using a #GMountOperation. Since 2.22.
2944func (x *FileIface) GetEjectMountableWithOperation() func(File, MountUnmountFlags, *MountOperation, *Cancellable, *AsyncReadyCallback, uintptr) {
2945	if x.xEjectMountableWithOperation == 0 {
2946		return nil
2947	}
2948	var rawCallback func(FileVarp uintptr, FlagsVarp MountUnmountFlags, MountOperationVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2949	purego.RegisterFunc(&rawCallback, x.xEjectMountableWithOperation)
2950	return func(FileVar File, FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2951		rawCallback(FileVar.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
2952	}
2953}
2954
2955// OverrideEjectMountableWithOperationFinish sets the "eject_mountable_with_operation_finish" callback function.
2956// Finishes an eject operation using a #GMountOperation. Since 2.22.
2957func (x *FileIface) OverrideEjectMountableWithOperationFinish(cb func(File, AsyncResult) bool) {
2958	if cb == nil {
2959		x.xEjectMountableWithOperationFinish = 0
2960	} else {
2961		x.xEjectMountableWithOperationFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
2962			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
2963		})
2964	}
2965}
2966
2967// GetEjectMountableWithOperationFinish gets the "eject_mountable_with_operation_finish" callback function.
2968// Finishes an eject operation using a #GMountOperation. Since 2.22.
2969func (x *FileIface) GetEjectMountableWithOperationFinish() func(File, AsyncResult) bool {
2970	if x.xEjectMountableWithOperationFinish == 0 {
2971		return nil
2972	}
2973	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
2974	purego.RegisterFunc(&rawCallback, x.xEjectMountableWithOperationFinish)
2975	return func(FileVar File, ResultVar AsyncResult) bool {
2976		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
2977	}
2978}
2979
2980// OverridePollMountable sets the "poll_mountable" callback function.
2981// Polls a mountable object for media changes. Since 2.22.
2982func (x *FileIface) OverridePollMountable(cb func(File, *Cancellable, *AsyncReadyCallback, uintptr)) {
2983	if cb == nil {
2984		x.xPollMountable = 0
2985	} else {
2986		x.xPollMountable = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
2987			cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp), (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
2988		})
2989	}
2990}
2991
2992// GetPollMountable gets the "poll_mountable" callback function.
2993// Polls a mountable object for media changes. Since 2.22.
2994func (x *FileIface) GetPollMountable() func(File, *Cancellable, *AsyncReadyCallback, uintptr) {
2995	if x.xPollMountable == 0 {
2996		return nil
2997	}
2998	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
2999	purego.RegisterFunc(&rawCallback, x.xPollMountable)
3000	return func(FileVar File, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3001		rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3002	}
3003}
3004
3005// OverridePollMountableFinish sets the "poll_mountable_finish" callback function.
3006// Finishes a poll operation for media changes. Since 2.22.
3007func (x *FileIface) OverridePollMountableFinish(cb func(File, AsyncResult) bool) {
3008	if cb == nil {
3009		x.xPollMountableFinish = 0
3010	} else {
3011		x.xPollMountableFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr) bool {
3012			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp})
3013		})
3014	}
3015}
3016
3017// GetPollMountableFinish gets the "poll_mountable_finish" callback function.
3018// Finishes a poll operation for media changes. Since 2.22.
3019func (x *FileIface) GetPollMountableFinish() func(File, AsyncResult) bool {
3020	if x.xPollMountableFinish == 0 {
3021		return nil
3022	}
3023	var rawCallback func(FileVarp uintptr, ResultVarp uintptr) bool
3024	purego.RegisterFunc(&rawCallback, x.xPollMountableFinish)
3025	return func(FileVar File, ResultVar AsyncResult) bool {
3026		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer())
3027	}
3028}
3029
3030// OverrideMeasureDiskUsage sets the "measure_disk_usage" callback function.
3031// Recursively measures the disk usage of @file. Since 2.38
3032func (x *FileIface) OverrideMeasureDiskUsage(cb func(File, FileMeasureFlags, *Cancellable, *FileMeasureProgressCallback, uintptr, *uint64, *uint64, *uint64) bool) {
3033	if cb == nil {
3034		x.xMeasureDiskUsage = 0
3035	} else {
3036		x.xMeasureDiskUsage = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileMeasureFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressDataVarp uintptr, DiskUsageVarp *uint64, NumDirsVarp *uint64, NumFilesVarp *uint64) bool {
3037			return cb(&FileBase{Ptr: FileVarp}, FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileMeasureProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressDataVarp, DiskUsageVarp, NumDirsVarp, NumFilesVarp)
3038		})
3039	}
3040}
3041
3042// GetMeasureDiskUsage gets the "measure_disk_usage" callback function.
3043// Recursively measures the disk usage of @file. Since 2.38
3044func (x *FileIface) GetMeasureDiskUsage() func(File, FileMeasureFlags, *Cancellable, *FileMeasureProgressCallback, uintptr, *uint64, *uint64, *uint64) bool {
3045	if x.xMeasureDiskUsage == 0 {
3046		return nil
3047	}
3048	var rawCallback func(FileVarp uintptr, FlagsVarp FileMeasureFlags, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressDataVarp uintptr, DiskUsageVarp *uint64, NumDirsVarp *uint64, NumFilesVarp *uint64) bool
3049	purego.RegisterFunc(&rawCallback, x.xMeasureDiskUsage)
3050	return func(FileVar File, FlagsVar FileMeasureFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) bool {
3051		return rawCallback(FileVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressDataVar, DiskUsageVar, NumDirsVar, NumFilesVar)
3052	}
3053}
3054
3055// OverrideMeasureDiskUsageAsync sets the "measure_disk_usage_async" callback function.
3056// Asynchronously recursively measures the disk usage of @file. Since 2.38
3057func (x *FileIface) OverrideMeasureDiskUsageAsync(cb func(File, FileMeasureFlags, int, *Cancellable, *FileMeasureProgressCallback, uintptr, *AsyncReadyCallback, uintptr)) {
3058	if cb == nil {
3059		x.xMeasureDiskUsageAsync = 0
3060	} else {
3061		x.xMeasureDiskUsageAsync = purego.NewCallback(func(FileVarp uintptr, FlagsVarp FileMeasureFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) {
3062			cb(&FileBase{Ptr: FileVarp}, FlagsVarp, IoPriorityVarp, CancellableNewFromInternalPtr(CancellableVarp), (*FileMeasureProgressCallback)(unsafe.Pointer(ProgressCallbackVarp)), ProgressDataVarp, (*AsyncReadyCallback)(unsafe.Pointer(CallbackVarp)), UserDataVarp)
3063		})
3064	}
3065}
3066
3067// GetMeasureDiskUsageAsync gets the "measure_disk_usage_async" callback function.
3068// Asynchronously recursively measures the disk usage of @file. Since 2.38
3069func (x *FileIface) GetMeasureDiskUsageAsync() func(File, FileMeasureFlags, int, *Cancellable, *FileMeasureProgressCallback, uintptr, *AsyncReadyCallback, uintptr) {
3070	if x.xMeasureDiskUsageAsync == 0 {
3071		return nil
3072	}
3073	var rawCallback func(FileVarp uintptr, FlagsVarp FileMeasureFlags, IoPriorityVarp int, CancellableVarp uintptr, ProgressCallbackVarp uintptr, ProgressDataVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr)
3074	purego.RegisterFunc(&rawCallback, x.xMeasureDiskUsageAsync)
3075	return func(FileVar File, FlagsVar FileMeasureFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3076		rawCallback(FileVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
3077	}
3078}
3079
3080// OverrideMeasureDiskUsageFinish sets the "measure_disk_usage_finish" callback function.
3081// Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38
3082func (x *FileIface) OverrideMeasureDiskUsageFinish(cb func(File, AsyncResult, *uint64, *uint64, *uint64) bool) {
3083	if cb == nil {
3084		x.xMeasureDiskUsageFinish = 0
3085	} else {
3086		x.xMeasureDiskUsageFinish = purego.NewCallback(func(FileVarp uintptr, ResultVarp uintptr, DiskUsageVarp *uint64, NumDirsVarp *uint64, NumFilesVarp *uint64) bool {
3087			return cb(&FileBase{Ptr: FileVarp}, &AsyncResultBase{Ptr: ResultVarp}, DiskUsageVarp, NumDirsVarp, NumFilesVarp)
3088		})
3089	}
3090}
3091
3092// GetMeasureDiskUsageFinish gets the "measure_disk_usage_finish" callback function.
3093// Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38
3094func (x *FileIface) GetMeasureDiskUsageFinish() func(File, AsyncResult, *uint64, *uint64, *uint64) bool {
3095	if x.xMeasureDiskUsageFinish == 0 {
3096		return nil
3097	}
3098	var rawCallback func(FileVarp uintptr, ResultVarp uintptr, DiskUsageVarp *uint64, NumDirsVarp *uint64, NumFilesVarp *uint64) bool
3099	purego.RegisterFunc(&rawCallback, x.xMeasureDiskUsageFinish)
3100	return func(FileVar File, ResultVar AsyncResult, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) bool {
3101		return rawCallback(FileVar.GoPointer(), ResultVar.GoPointer(), DiskUsageVar, NumDirsVar, NumFilesVar)
3102	}
3103}
3104
3105// OverrideQueryExists sets the "query_exists" callback function.
3106// Queries whether a file exists. Since 2.84
3107func (x *FileIface) OverrideQueryExists(cb func(File, *Cancellable) bool) {
3108	if cb == nil {
3109		x.xQueryExists = 0
3110	} else {
3111		x.xQueryExists = purego.NewCallback(func(FileVarp uintptr, CancellableVarp uintptr) bool {
3112			return cb(&FileBase{Ptr: FileVarp}, CancellableNewFromInternalPtr(CancellableVarp))
3113		})
3114	}
3115}
3116
3117// GetQueryExists gets the "query_exists" callback function.
3118// Queries whether a file exists. Since 2.84
3119func (x *FileIface) GetQueryExists() func(File, *Cancellable) bool {
3120	if x.xQueryExists == 0 {
3121		return nil
3122	}
3123	var rawCallback func(FileVarp uintptr, CancellableVarp uintptr) bool
3124	purego.RegisterFunc(&rawCallback, x.xQueryExists)
3125	return func(FileVar File, CancellableVar *Cancellable) bool {
3126		return rawCallback(FileVar.GoPointer(), CancellableVar.GoPointer())
3127	}
3128}
3129
3130// `GFile` is a high level abstraction for manipulating files on a
3131// virtual file system. `GFile`s are lightweight, immutable objects
3132// that do no I/O upon creation. It is necessary to understand that
3133// `GFile` objects do not represent files, merely an identifier for a
3134// file. All file content I/O is implemented as streaming operations
3135// (see [class@Gio.InputStream] and [class@Gio.OutputStream]).
3136//
3137// To construct a `GFile`, you can use:
3138//
3139//   - [func@Gio.File.new_for_path] if you have a path.
3140//   - [func@Gio.File.new_for_uri] if you have a URI.
3141//   - [func@Gio.File.new_for_commandline_arg] or
3142//     [func@Gio.File.new_for_commandline_arg_and_cwd] for a command line
3143//     argument.
3144//   - [func@Gio.File.new_tmp] to create a temporary file from a template.
3145//   - [func@Gio.File.new_tmp_async] to asynchronously create a temporary file.
3146//   - [func@Gio.File.new_tmp_dir_async] to asynchronously create a temporary
3147//     directory.
3148//   - [func@Gio.File.parse_name] from a UTF-8 string gotten from
3149//     [method@Gio.File.get_parse_name].
3150//   - [func@Gio.File.new_build_filename] or [func@Gio.File.new_build_filenamev]
3151//     to create a file from path elements.
3152//
3153// One way to think of a `GFile` is as an abstraction of a pathname. For
3154// normal files the system pathname is what is stored internally, but as
3155// `GFile`s are extensible it could also be something else that corresponds
3156// to a pathname in a userspace implementation of a filesystem.
3157//
3158// `GFile`s make up hierarchies of directories and files that correspond to
3159// the files on a filesystem. You can move through the file system with
3160// `GFile` using [method@Gio.File.get_parent] to get an identifier for the
3161// parent directory, [method@Gio.File.get_child] to get a child within a
3162// directory, and [method@Gio.File.resolve_relative_path] to resolve a relative
3163// path between two `GFile`s. There can be multiple hierarchies, so you may not
3164// end up at the same root if you repeatedly call [method@Gio.File.get_parent]
3165// on two different files.
3166//
3167// All `GFile`s have a basename (get with [method@Gio.File.get_basename]). These
3168// names are byte strings that are used to identify the file on the filesystem
3169// (relative to its parent directory) and there is no guarantees that they
3170// have any particular charset encoding or even make any sense at all. If
3171// you want to use filenames in a user interface you should use the display
3172// name that you can get by requesting the
3173// `G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME` attribute with
3174// [method@Gio.File.query_info]. This is guaranteed to be in UTF-8 and can be
3175// used in a user interface. But always store the real basename or the `GFile`
3176// to use to actually access the file, because there is no way to go from a
3177// display name to the actual name.
3178//
3179// Using `GFile` as an identifier has the same weaknesses as using a path
3180// in that there may be multiple aliases for the same file. For instance,
3181// hard or soft links may cause two different `GFile`s to refer to the same
3182// file. Other possible causes for aliases are: case insensitive filesystems,
3183// short and long names on FAT/NTFS, or bind mounts in Linux. If you want to
3184// check if two `GFile`s point to the same file you can query for the
3185// `G_FILE_ATTRIBUTE_ID_FILE` attribute. Note that `GFile` does some trivial
3186// canonicalization of pathnames passed in, so that trivial differences in
3187// the path string used at creation (duplicated slashes, slash at end of
3188// path, `.` or `..` path segments, etc) does not create different `GFile`s.
3189//
3190// Many `GFile` operations have both synchronous and asynchronous versions
3191// to suit your application. Asynchronous versions of synchronous functions
3192// simply have `_async()` appended to their function names. The asynchronous
3193// I/O functions call a [callback@Gio.AsyncReadyCallback] which is then used to
3194// finalize the operation, producing a [iface@Gio.AsyncResult] which is then
3195// passed to the function’s matching `_finish()` operation.
3196//
3197// It is highly recommended to use asynchronous calls when running within a
3198// shared main loop, such as in the main thread of an application. This avoids
3199// I/O operations blocking other sources on the main loop from being dispatched.
3200// Synchronous I/O operations should be performed from worker threads. See the
3201// [introduction to asynchronous programming section](overview.html#asynchronous-programming)
3202// for more.
3203//
3204// Some `GFile` operations almost always take a noticeable amount of time, and
3205// so do not have synchronous analogs. Notable cases include:
3206//
3207//   - [method@Gio.File.mount_mountable] to mount a mountable file.
3208//   - [method@Gio.File.unmount_mountable_with_operation] to unmount a mountable
3209//     file.
3210//   - [method@Gio.File.eject_mountable_with_operation] to eject a mountable file.
3211//
3212// ## Entity Tags
3213//
3214// One notable feature of `GFile`s are entity tags, or ‘etags’ for
3215// short. Entity tags are somewhat like a more abstract version of the
3216// traditional mtime, and can be used to quickly determine if the file
3217// has been modified from the version on the file system. See the
3218// HTTP 1.1
3219// [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
3220// for HTTP `ETag` headers, which are a very similar concept.
3221type File interface {
3222	GoPointer() uintptr
3223	SetGoPointer(uintptr)
3224	AppendTo(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error)
3225	AppendToAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3226	AppendToFinish(ResVar AsyncResult) (*FileOutputStream, error)
3227	BuildAttributeListForCopy(FlagsVar FileCopyFlags, CancellableVar *Cancellable) (string, error)
3228	Copy(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error)
3229	CopyAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3230	CopyAsyncWithClosures(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackClosureVar *gobject.Closure, ReadyCallbackClosureVar *gobject.Closure)
3231	CopyAttributes(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable) (bool, error)
3232	CopyFinish(ResVar AsyncResult) (bool, error)
3233	Create(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error)
3234	CreateAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3235	CreateFinish(ResVar AsyncResult) (*FileOutputStream, error)
3236	CreateReadwrite(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error)
3237	CreateReadwriteAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3238	CreateReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error)
3239	Delete(CancellableVar *Cancellable) (bool, error)
3240	DeleteAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3241	DeleteFinish(ResultVar AsyncResult) (bool, error)
3242	Dup() *FileBase
3243	EjectMountable(FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3244	EjectMountableFinish(ResultVar AsyncResult) (bool, error)
3245	EjectMountableWithOperation(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3246	EjectMountableWithOperationFinish(ResultVar AsyncResult) (bool, error)
3247	EnumerateChildren(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileEnumerator, error)
3248	EnumerateChildrenAsync(AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3249	EnumerateChildrenFinish(ResVar AsyncResult) (*FileEnumerator, error)
3250	Equal(File2Var File) bool
3251	FindEnclosingMount(CancellableVar *Cancellable) (*MountBase, error)
3252	FindEnclosingMountAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3253	FindEnclosingMountFinish(ResVar AsyncResult) (*MountBase, error)
3254	GetBasename() string
3255	GetChild(NameVar string) *FileBase
3256	GetChildForDisplayName(DisplayNameVar string) (*FileBase, error)
3257	GetParent() *FileBase
3258	GetParseName() string
3259	GetPath() string
3260	GetRelativePath(DescendantVar File) string
3261	GetUri() string
3262	GetUriScheme() string
3263	HasParent(ParentVar File) bool
3264	HasPrefix(PrefixVar File) bool
3265	HasUriScheme(UriSchemeVar string) bool
3266	Hash() uint
3267	IsNative() bool
3268	LoadBytes(CancellableVar *Cancellable, EtagOutVar *string) (*glib.Bytes, error)
3269	LoadBytesAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3270	LoadBytesFinish(ResultVar AsyncResult, EtagOutVar *string) (*glib.Bytes, error)
3271	LoadContents(CancellableVar *Cancellable, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error)
3272	LoadContentsAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3273	LoadContentsFinish(ResVar AsyncResult, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error)
3274	LoadPartialContentsAsync(CancellableVar *Cancellable, ReadMoreCallbackVar *FileReadMoreCallback, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3275	LoadPartialContentsFinish(ResVar AsyncResult, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error)
3276	MakeDirectory(CancellableVar *Cancellable) (bool, error)
3277	MakeDirectoryAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3278	MakeDirectoryFinish(ResultVar AsyncResult) (bool, error)
3279	MakeDirectoryWithParents(CancellableVar *Cancellable) (bool, error)
3280	MakeSymbolicLink(SymlinkValueVar string, CancellableVar *Cancellable) (bool, error)
3281	MakeSymbolicLinkAsync(SymlinkValueVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3282	MakeSymbolicLinkFinish(ResultVar AsyncResult) (bool, error)
3283	MeasureDiskUsage(FlagsVar FileMeasureFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) (bool, error)
3284	MeasureDiskUsageAsync(FlagsVar FileMeasureFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3285	MeasureDiskUsageFinish(ResultVar AsyncResult, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) (bool, error)
3286	Monitor(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error)
3287	MonitorDirectory(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error)
3288	MonitorFile(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error)
3289	MountEnclosingVolume(FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3290	MountEnclosingVolumeFinish(ResultVar AsyncResult) (bool, error)
3291	MountMountable(FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3292	MountMountableFinish(ResultVar AsyncResult) (*FileBase, error)
3293	Move(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error)
3294	MoveAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3295	MoveAsyncWithClosures(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackClosureVar *gobject.Closure, ReadyCallbackClosureVar *gobject.Closure)
3296	MoveFinish(ResultVar AsyncResult) (bool, error)
3297	OpenReadwrite(CancellableVar *Cancellable) (*FileIOStream, error)
3298	OpenReadwriteAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3299	OpenReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error)
3300	PeekPath() string
3301	PollMountable(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3302	PollMountableFinish(ResultVar AsyncResult) (bool, error)
3303	QueryDefaultHandler(CancellableVar *Cancellable) (*AppInfoBase, error)
3304	QueryDefaultHandlerAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3305	QueryDefaultHandlerFinish(ResultVar AsyncResult) (*AppInfoBase, error)
3306	QueryExists(CancellableVar *Cancellable) bool
3307	QueryFileType(FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) FileType
3308	QueryFilesystemInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error)
3309	QueryFilesystemInfoAsync(AttributesVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3310	QueryFilesystemInfoFinish(ResVar AsyncResult) (*FileInfo, error)
3311	QueryInfo(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileInfo, error)
3312	QueryInfoAsync(AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3313	QueryInfoFinish(ResVar AsyncResult) (*FileInfo, error)
3314	QuerySettableAttributes(CancellableVar *Cancellable) (*FileAttributeInfoList, error)
3315	QueryWritableNamespaces(CancellableVar *Cancellable) (*FileAttributeInfoList, error)
3316	Read(CancellableVar *Cancellable) (*FileInputStream, error)
3317	ReadAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3318	ReadFinish(ResVar AsyncResult) (*FileInputStream, error)
3319	Replace(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error)
3320	ReplaceAsync(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3321	ReplaceContents(ContentsVar string, LengthVar uint, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, NewEtagVar *string, CancellableVar *Cancellable) (bool, error)
3322	ReplaceContentsAsync(ContentsVar string, LengthVar uint, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3323	ReplaceContentsBytesAsync(ContentsVar *glib.Bytes, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3324	ReplaceContentsFinish(ResVar AsyncResult, NewEtagVar *string) (bool, error)
3325	ReplaceFinish(ResVar AsyncResult) (*FileOutputStream, error)
3326	ReplaceReadwrite(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error)
3327	ReplaceReadwriteAsync(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3328	ReplaceReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error)
3329	ResolveRelativePath(RelativePathVar string) *FileBase
3330	SetAttribute(AttributeVar string, TypeVar FileAttributeType, ValuePVar uintptr, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3331	SetAttributeByteString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3332	SetAttributeInt32(AttributeVar string, ValueVar int32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3333	SetAttributeInt64(AttributeVar string, ValueVar int64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3334	SetAttributeString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3335	SetAttributeUint32(AttributeVar string, ValueVar uint32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3336	SetAttributeUint64(AttributeVar string, ValueVar uint64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3337	SetAttributesAsync(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3338	SetAttributesFinish(ResultVar AsyncResult, InfoVar **FileInfo) (bool, error)
3339	SetAttributesFromInfo(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error)
3340	SetDisplayName(DisplayNameVar string, CancellableVar *Cancellable) (*FileBase, error)
3341	SetDisplayNameAsync(DisplayNameVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3342	SetDisplayNameFinish(ResVar AsyncResult) (*FileBase, error)
3343	StartMountable(FlagsVar DriveStartFlags, StartOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3344	StartMountableFinish(ResultVar AsyncResult) (bool, error)
3345	StopMountable(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3346	StopMountableFinish(ResultVar AsyncResult) (bool, error)
3347	SupportsThreadContexts() bool
3348	Trash(CancellableVar *Cancellable) (bool, error)
3349	TrashAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3350	TrashFinish(ResultVar AsyncResult) (bool, error)
3351	UnmountMountable(FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3352	UnmountMountableFinish(ResultVar AsyncResult) (bool, error)
3353	UnmountMountableWithOperation(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr)
3354	UnmountMountableWithOperationFinish(ResultVar AsyncResult) (bool, error)
3355}
3356
3357var xFileGLibType func() types.GType
3358
3359func FileGLibType() types.GType {
3360	return xFileGLibType()
3361}
3362
3363type FileBase struct {
3364	Ptr uintptr
3365}
3366
3367func (x *FileBase) GoPointer() uintptr {
3368	if x == nil {
3369		return 0
3370	}
3371	return x.Ptr
3372}
3373
3374func (x *FileBase) SetGoPointer(ptr uintptr) {
3375	x.Ptr = ptr
3376}
3377
3378// Gets an output stream for appending data to the file.
3379// If the file doesn't already exist it is created.
3380//
3381// By default files created are generally readable by everyone,
3382// but if you pass %G_FILE_CREATE_PRIVATE in @flags the file
3383// will be made readable only to the current user, to the level that
3384// is supported on the target filesystem.
3385//
3386// If @cancellable is not %NULL, then the operation can be cancelled
3387// by triggering the cancellable object from another thread. If the
3388// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
3389// returned.
3390//
3391// Some file systems don't allow all file names, and may return an
3392// %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the
3393// %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are
3394// possible too, and depend on what kind of filesystem the file is on.
3395func (x *FileBase) AppendTo(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
3396	var cls *FileOutputStream
3397	var cerr *glib.Error
3398
3399	cret := XGFileAppendTo(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
3400
3401	if cret == 0 {
3402		return nil, cerr
3403	}
3404	cls = &FileOutputStream{}
3405	cls.Ptr = cret
3406	if cerr == nil {
3407		return cls, nil
3408	}
3409	return cls, cerr
3410
3411}
3412
3413// Asynchronously opens @file for appending.
3414//
3415// For more details, see g_file_append_to() which is
3416// the synchronous version of this call.
3417//
3418// When the operation is finished, @callback will be called.
3419// You can then call g_file_append_to_finish() to get the result
3420// of the operation.
3421func (x *FileBase) AppendToAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3422
3423	XGFileAppendToAsync(x.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3424
3425}
3426
3427// Finishes an asynchronous file append operation started with
3428// g_file_append_to_async().
3429func (x *FileBase) AppendToFinish(ResVar AsyncResult) (*FileOutputStream, error) {
3430	var cls *FileOutputStream
3431	var cerr *glib.Error
3432
3433	cret := XGFileAppendToFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3434
3435	if cret == 0 {
3436		return nil, cerr
3437	}
3438	cls = &FileOutputStream{}
3439	cls.Ptr = cret
3440	if cerr == nil {
3441		return cls, nil
3442	}
3443	return cls, cerr
3444
3445}
3446
3447// Prepares the file attribute query string for copying to @file.
3448//
3449// This function prepares an attribute query string to be
3450// passed to g_file_query_info() to get a list of attributes
3451// normally copied with the file (see g_file_copy_attributes()
3452// for the detailed description). This function is used by the
3453// implementation of g_file_copy_attributes() and is useful
3454// when one needs to query and set the attributes in two
3455// stages (e.g., for recursive move of a directory).
3456func (x *FileBase) BuildAttributeListForCopy(FlagsVar FileCopyFlags, CancellableVar *Cancellable) (string, error) {
3457	var cerr *glib.Error
3458
3459	cret := XGFileBuildAttributeListForCopy(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
3460	if cerr == nil {
3461		return cret, nil
3462	}
3463	return cret, cerr
3464
3465}
3466
3467// Copies the file @source to the location specified by @destination.
3468// Can not handle recursive copies of directories.
3469//
3470// If the flag %G_FILE_COPY_OVERWRITE is specified an already
3471// existing @destination file is overwritten.
3472//
3473// If the flag %G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
3474// will be copied as symlinks, otherwise the target of the
3475// @source symlink will be copied.
3476//
3477// If the flag %G_FILE_COPY_ALL_METADATA is specified then all the metadata
3478// that is possible to copy is copied, not just the default subset (which,
3479// for instance, does not include the owner, see #GFileInfo).
3480//
3481// If @cancellable is not %NULL, then the operation can be cancelled by
3482// triggering the cancellable object from another thread. If the operation
3483// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3484//
3485// If @progress_callback is not %NULL, then the operation can be monitored
3486// by setting this to a #GFileProgressCallback function.
3487// @progress_callback_data will be passed to this function. It is guaranteed
3488// that this callback will be called after all data has been transferred with
3489// the total number of bytes copied during the operation.
3490//
3491// If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error
3492// is returned, independent on the status of the @destination.
3493//
3494// If %G_FILE_COPY_OVERWRITE is not specified and the target exists, then
3495// the error %G_IO_ERROR_EXISTS is returned.
3496//
3497// If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
3498// error is returned. If trying to overwrite a directory with a directory the
3499// %G_IO_ERROR_WOULD_MERGE error is returned.
3500//
3501// If the source is a directory and the target does not exist, or
3502// %G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
3503// %G_IO_ERROR_WOULD_RECURSE error is returned.
3504//
3505// If you are interested in copying the #GFile object itself (not the on-disk
3506// file), see g_file_dup().
3507func (x *FileBase) Copy(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error) {
3508	var cerr *glib.Error
3509
3510	cret := XGFileCopy(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, &cerr)
3511	if cerr == nil {
3512		return cret, nil
3513	}
3514	return cret, cerr
3515
3516}
3517
3518// Copies the file @source to the location specified by @destination
3519// asynchronously. For details of the behaviour, see g_file_copy().
3520//
3521// If @progress_callback is not %NULL, then that function that will be called
3522// just like in g_file_copy(). The callback will run in the default main context
3523// of the thread calling g_file_copy_async() — the same context as @callback is
3524// run in.
3525//
3526// When the operation is finished, @callback will be called. You can then call
3527// g_file_copy_finish() to get the result of the operation.
3528func (x *FileBase) CopyAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3529
3530	XGFileCopyAsync(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
3531
3532}
3533
3534// Version of [method@Gio.File.copy_async] using closures instead of callbacks for
3535// easier binding in other languages.
3536func (x *FileBase) CopyAsyncWithClosures(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackClosureVar *gobject.Closure, ReadyCallbackClosureVar *gobject.Closure) {
3537
3538	XGFileCopyAsyncWithClosures(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), ProgressCallbackClosureVar, ReadyCallbackClosureVar)
3539
3540}
3541
3542// Copies the file attributes from @source to @destination.
3543//
3544// Normally only a subset of the file attributes are copied,
3545// those that are copies in a normal file copy operation
3546// (which for instance does not include e.g. owner). However
3547// if %G_FILE_COPY_ALL_METADATA is specified in @flags, then
3548// all the metadata that is possible to copy is copied. This
3549// is useful when implementing move by copy + delete source.
3550func (x *FileBase) CopyAttributes(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable) (bool, error) {
3551	var cerr *glib.Error
3552
3553	cret := XGFileCopyAttributes(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
3554	if cerr == nil {
3555		return cret, nil
3556	}
3557	return cret, cerr
3558
3559}
3560
3561// Finishes copying the file started with g_file_copy_async().
3562func (x *FileBase) CopyFinish(ResVar AsyncResult) (bool, error) {
3563	var cerr *glib.Error
3564
3565	cret := XGFileCopyFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3566	if cerr == nil {
3567		return cret, nil
3568	}
3569	return cret, cerr
3570
3571}
3572
3573// Creates a new file and returns an output stream for writing to it.
3574// The file must not already exist.
3575//
3576// By default files created are generally readable by everyone,
3577// but if you pass %G_FILE_CREATE_PRIVATE in @flags the file
3578// will be made readable only to the current user, to the level
3579// that is supported on the target filesystem.
3580//
3581// If @cancellable is not %NULL, then the operation can be cancelled
3582// by triggering the cancellable object from another thread. If the
3583// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
3584// returned.
3585//
3586// If a file or directory with this name already exists the
3587// %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
3588// allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
3589// error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will
3590// be returned. Other errors are possible too, and depend on what kind
3591// of filesystem the file is on.
3592func (x *FileBase) Create(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
3593	var cls *FileOutputStream
3594	var cerr *glib.Error
3595
3596	cret := XGFileCreate(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
3597
3598	if cret == 0 {
3599		return nil, cerr
3600	}
3601	cls = &FileOutputStream{}
3602	cls.Ptr = cret
3603	if cerr == nil {
3604		return cls, nil
3605	}
3606	return cls, cerr
3607
3608}
3609
3610// Asynchronously creates a new file and returns an output stream
3611// for writing to it. The file must not already exist.
3612//
3613// For more details, see g_file_create() which is
3614// the synchronous version of this call.
3615//
3616// When the operation is finished, @callback will be called.
3617// You can then call g_file_create_finish() to get the result
3618// of the operation.
3619func (x *FileBase) CreateAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3620
3621	XGFileCreateAsync(x.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3622
3623}
3624
3625// Finishes an asynchronous file create operation started with
3626// g_file_create_async().
3627func (x *FileBase) CreateFinish(ResVar AsyncResult) (*FileOutputStream, error) {
3628	var cls *FileOutputStream
3629	var cerr *glib.Error
3630
3631	cret := XGFileCreateFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3632
3633	if cret == 0 {
3634		return nil, cerr
3635	}
3636	cls = &FileOutputStream{}
3637	cls.Ptr = cret
3638	if cerr == nil {
3639		return cls, nil
3640	}
3641	return cls, cerr
3642
3643}
3644
3645// Creates a new file and returns a stream for reading and
3646// writing to it. The file must not already exist.
3647//
3648// By default files created are generally readable by everyone,
3649// but if you pass %G_FILE_CREATE_PRIVATE in @flags the file
3650// will be made readable only to the current user, to the level
3651// that is supported on the target filesystem.
3652//
3653// If @cancellable is not %NULL, then the operation can be cancelled
3654// by triggering the cancellable object from another thread. If the
3655// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
3656// returned.
3657//
3658// If a file or directory with this name already exists, the
3659// %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
3660// allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
3661// error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG
3662// will be returned. Other errors are possible too, and depend on what
3663// kind of filesystem the file is on.
3664//
3665// Note that in many non-local file cases read and write streams are
3666// not supported, so make sure you really need to do read and write
3667// streaming, rather than just opening for reading or writing.
3668func (x *FileBase) CreateReadwrite(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error) {
3669	var cls *FileIOStream
3670	var cerr *glib.Error
3671
3672	cret := XGFileCreateReadwrite(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
3673
3674	if cret == 0 {
3675		return nil, cerr
3676	}
3677	cls = &FileIOStream{}
3678	cls.Ptr = cret
3679	if cerr == nil {
3680		return cls, nil
3681	}
3682	return cls, cerr
3683
3684}
3685
3686// Asynchronously creates a new file and returns a stream
3687// for reading and writing to it. The file must not already exist.
3688//
3689// For more details, see g_file_create_readwrite() which is
3690// the synchronous version of this call.
3691//
3692// When the operation is finished, @callback will be called.
3693// You can then call g_file_create_readwrite_finish() to get
3694// the result of the operation.
3695func (x *FileBase) CreateReadwriteAsync(FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3696
3697	XGFileCreateReadwriteAsync(x.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3698
3699}
3700
3701// Finishes an asynchronous file create operation started with
3702// g_file_create_readwrite_async().
3703func (x *FileBase) CreateReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
3704	var cls *FileIOStream
3705	var cerr *glib.Error
3706
3707	cret := XGFileCreateReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3708
3709	if cret == 0 {
3710		return nil, cerr
3711	}
3712	cls = &FileIOStream{}
3713	cls.Ptr = cret
3714	if cerr == nil {
3715		return cls, nil
3716	}
3717	return cls, cerr
3718
3719}
3720
3721// Deletes a file. If the @file is a directory, it will only be
3722// deleted if it is empty. This has the same semantics as g_unlink().
3723//
3724// If @file doesn’t exist, %G_IO_ERROR_NOT_FOUND will be returned. This allows
3725// for deletion to be implemented avoiding
3726// [time-of-check to time-of-use races](https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use):
3727// |[
3728// g_autoptr(GError) local_error = NULL;
3729// if (!g_file_delete (my_file, my_cancellable, &local_error) &&
3730//
3731//	  !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
3732//	{
3733//	  // deletion failed for some reason other than the file not existing:
3734//	  // so report the error
3735//	  g_warning ("Failed to delete %s: %s",
3736//	             g_file_peek_path (my_file), local_error->message);
3737//	}
3738//
3739// ]|
3740//
3741// If @cancellable is not %NULL, then the operation can be cancelled by
3742// triggering the cancellable object from another thread. If the operation
3743// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3744func (x *FileBase) Delete(CancellableVar *Cancellable) (bool, error) {
3745	var cerr *glib.Error
3746
3747	cret := XGFileDelete(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
3748	if cerr == nil {
3749		return cret, nil
3750	}
3751	return cret, cerr
3752
3753}
3754
3755// Asynchronously delete a file. If the @file is a directory, it will
3756// only be deleted if it is empty.  This has the same semantics as
3757// g_unlink().
3758func (x *FileBase) DeleteAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3759
3760	XGFileDeleteAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3761
3762}
3763
3764// Finishes deleting a file started with g_file_delete_async().
3765func (x *FileBase) DeleteFinish(ResultVar AsyncResult) (bool, error) {
3766	var cerr *glib.Error
3767
3768	cret := XGFileDeleteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
3769	if cerr == nil {
3770		return cret, nil
3771	}
3772	return cret, cerr
3773
3774}
3775
3776// Duplicates a #GFile handle. This operation does not duplicate
3777// the actual file or directory represented by the #GFile; see
3778// g_file_copy() if attempting to copy a file.
3779//
3780// g_file_dup() is useful when a second handle is needed to the same underlying
3781// file, for use in a separate thread (#GFile is not thread-safe). For use
3782// within the same thread, use g_object_ref() to increment the existing object’s
3783// reference count.
3784//
3785// This call does no blocking I/O.
3786func (x *FileBase) Dup() *FileBase {
3787	var cls *FileBase
3788
3789	cret := XGFileDup(x.GoPointer())
3790
3791	if cret == 0 {
3792		return nil
3793	}
3794	cls = &FileBase{}
3795	cls.Ptr = cret
3796	return cls
3797}
3798
3799// Starts an asynchronous eject on a mountable.
3800// When this operation has completed, @callback will be called with
3801// @user_user data, and the operation can be finalized with
3802// g_file_eject_mountable_finish().
3803//
3804// If @cancellable is not %NULL, then the operation can be cancelled by
3805// triggering the cancellable object from another thread. If the operation
3806// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3807func (x *FileBase) EjectMountable(FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3808
3809	XGFileEjectMountable(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3810
3811}
3812
3813// Finishes an asynchronous eject operation started by
3814// g_file_eject_mountable().
3815func (x *FileBase) EjectMountableFinish(ResultVar AsyncResult) (bool, error) {
3816	var cerr *glib.Error
3817
3818	cret := XGFileEjectMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
3819	if cerr == nil {
3820		return cret, nil
3821	}
3822	return cret, cerr
3823
3824}
3825
3826// Starts an asynchronous eject on a mountable.
3827// When this operation has completed, @callback will be called with
3828// @user_user data, and the operation can be finalized with
3829// g_file_eject_mountable_with_operation_finish().
3830//
3831// If @cancellable is not %NULL, then the operation can be cancelled by
3832// triggering the cancellable object from another thread. If the operation
3833// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3834func (x *FileBase) EjectMountableWithOperation(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3835
3836	XGFileEjectMountableWithOperation(x.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3837
3838}
3839
3840// Finishes an asynchronous eject operation started by
3841// g_file_eject_mountable_with_operation().
3842func (x *FileBase) EjectMountableWithOperationFinish(ResultVar AsyncResult) (bool, error) {
3843	var cerr *glib.Error
3844
3845	cret := XGFileEjectMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
3846	if cerr == nil {
3847		return cret, nil
3848	}
3849	return cret, cerr
3850
3851}
3852
3853// Gets the requested information about the files in a directory.
3854// The result is a #GFileEnumerator object that will give out
3855// #GFileInfo objects for all the files in the directory.
3856//
3857// The @attributes value is a string that specifies the file
3858// attributes that should be gathered. It is not an error if
3859// it's not possible to read a particular requested attribute
3860// from a file - it just won't be set. @attributes should
3861// be a comma-separated list of attributes or attribute wildcards.
3862// The wildcard "*" means all attributes, and a wildcard like
3863// "standard::*" means all attributes in the standard namespace.
3864// An example attribute query be "standard::*,owner::user".
3865// The standard attributes are available as defines, like
3866// %G_FILE_ATTRIBUTE_STANDARD_NAME. %G_FILE_ATTRIBUTE_STANDARD_NAME should
3867// always be specified if you plan to call g_file_enumerator_get_child() or
3868// g_file_enumerator_iterate() on the returned enumerator.
3869//
3870// If @cancellable is not %NULL, then the operation can be cancelled
3871// by triggering the cancellable object from another thread. If the
3872// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
3873// returned.
3874//
3875// If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
3876// be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY
3877// error will be returned. Other errors are possible too.
3878func (x *FileBase) EnumerateChildren(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileEnumerator, error) {
3879	var cls *FileEnumerator
3880	var cerr *glib.Error
3881
3882	cret := XGFileEnumerateChildren(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
3883
3884	if cret == 0 {
3885		return nil, cerr
3886	}
3887	cls = &FileEnumerator{}
3888	cls.Ptr = cret
3889	if cerr == nil {
3890		return cls, nil
3891	}
3892	return cls, cerr
3893
3894}
3895
3896// Asynchronously gets the requested information about the files
3897// in a directory. The result is a #GFileEnumerator object that will
3898// give out #GFileInfo objects for all the files in the directory.
3899//
3900// For more details, see g_file_enumerate_children() which is
3901// the synchronous version of this call.
3902//
3903// When the operation is finished, @callback will be called. You can
3904// then call g_file_enumerate_children_finish() to get the result of
3905// the operation.
3906func (x *FileBase) EnumerateChildrenAsync(AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3907
3908	XGFileEnumerateChildrenAsync(x.GoPointer(), AttributesVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3909
3910}
3911
3912// Finishes an async enumerate children operation.
3913// See g_file_enumerate_children_async().
3914func (x *FileBase) EnumerateChildrenFinish(ResVar AsyncResult) (*FileEnumerator, error) {
3915	var cls *FileEnumerator
3916	var cerr *glib.Error
3917
3918	cret := XGFileEnumerateChildrenFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3919
3920	if cret == 0 {
3921		return nil, cerr
3922	}
3923	cls = &FileEnumerator{}
3924	cls.Ptr = cret
3925	if cerr == nil {
3926		return cls, nil
3927	}
3928	return cls, cerr
3929
3930}
3931
3932// Checks if the two given #GFiles refer to the same file.
3933//
3934// Note that two #GFiles that differ can still refer to the same
3935// file on the filesystem due to various forms of filename
3936// aliasing.
3937//
3938// This call does no blocking I/O.
3939func (x *FileBase) Equal(File2Var File) bool {
3940
3941	cret := XGFileEqual(x.GoPointer(), File2Var.GoPointer())
3942	return cret
3943}
3944
3945// Gets a #GMount for the #GFile.
3946//
3947// #GMount is returned only for user interesting locations, see
3948// #GVolumeMonitor. If the #GFileIface for @file does not have a #mount,
3949// @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL #will be returned.
3950//
3951// If @cancellable is not %NULL, then the operation can be cancelled by
3952// triggering the cancellable object from another thread. If the operation
3953// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3954func (x *FileBase) FindEnclosingMount(CancellableVar *Cancellable) (*MountBase, error) {
3955	var cls *MountBase
3956	var cerr *glib.Error
3957
3958	cret := XGFileFindEnclosingMount(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
3959
3960	if cret == 0 {
3961		return nil, cerr
3962	}
3963	cls = &MountBase{}
3964	cls.Ptr = cret
3965	if cerr == nil {
3966		return cls, nil
3967	}
3968	return cls, cerr
3969
3970}
3971
3972// Asynchronously gets the mount for the file.
3973//
3974// For more details, see g_file_find_enclosing_mount() which is
3975// the synchronous version of this call.
3976//
3977// When the operation is finished, @callback will be called.
3978// You can then call g_file_find_enclosing_mount_finish() to
3979// get the result of the operation.
3980func (x *FileBase) FindEnclosingMountAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
3981
3982	XGFileFindEnclosingMountAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
3983
3984}
3985
3986// Finishes an asynchronous find mount request.
3987// See g_file_find_enclosing_mount_async().
3988func (x *FileBase) FindEnclosingMountFinish(ResVar AsyncResult) (*MountBase, error) {
3989	var cls *MountBase
3990	var cerr *glib.Error
3991
3992	cret := XGFileFindEnclosingMountFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
3993
3994	if cret == 0 {
3995		return nil, cerr
3996	}
3997	cls = &MountBase{}
3998	cls.Ptr = cret
3999	if cerr == nil {
4000		return cls, nil
4001	}
4002	return cls, cerr
4003
4004}
4005
4006// Gets the base name (the last component of the path) for a given #GFile.
4007//
4008// If called for the top level of a system (such as the filesystem root
4009// or a uri like sftp://host/) it will return a single directory separator
4010// (and on Windows, possibly a drive letter).
4011//
4012// The base name is a byte string (not UTF-8). It has no defined encoding
4013// or rules other than it may not contain zero bytes.  If you want to use
4014// filenames in a user interface you should use the display name that you
4015// can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
4016// attribute with g_file_query_info().
4017//
4018// This call does no blocking I/O.
4019func (x *FileBase) GetBasename() string {
4020
4021	cret := XGFileGetBasename(x.GoPointer())
4022	return cret
4023}
4024
4025// Gets a child of @file with basename equal to @name.
4026//
4027// Note that the file with that specific name might not exist, but
4028// you can still have a #GFile that points to it. You can use this
4029// for instance to create that file.
4030//
4031// This call does no blocking I/O.
4032func (x *FileBase) GetChild(NameVar string) *FileBase {
4033	var cls *FileBase
4034
4035	cret := XGFileGetChild(x.GoPointer(), NameVar)
4036
4037	if cret == 0 {
4038		return nil
4039	}
4040	cls = &FileBase{}
4041	cls.Ptr = cret
4042	return cls
4043}
4044
4045// Gets the child of @file for a given @display_name (i.e. a UTF-8
4046// version of the name). If this function fails, it returns %NULL
4047// and @error will be set. This is very useful when constructing a
4048// #GFile for a new file and the user entered the filename in the
4049// user interface, for instance when you select a directory and
4050// type a filename in the file selector.
4051//
4052// This call does no blocking I/O.
4053func (x *FileBase) GetChildForDisplayName(DisplayNameVar string) (*FileBase, error) {
4054	var cls *FileBase
4055	var cerr *glib.Error
4056
4057	cret := XGFileGetChildForDisplayName(x.GoPointer(), DisplayNameVar, &cerr)
4058
4059	if cret == 0 {
4060		return nil, cerr
4061	}
4062	cls = &FileBase{}
4063	cls.Ptr = cret
4064	if cerr == nil {
4065		return cls, nil
4066	}
4067	return cls, cerr
4068
4069}
4070
4071// Gets the parent directory for the @file.
4072// If the @file represents the root directory of the
4073// file system, then %NULL will be returned.
4074//
4075// This call does no blocking I/O.
4076func (x *FileBase) GetParent() *FileBase {
4077	var cls *FileBase
4078
4079	cret := XGFileGetParent(x.GoPointer())
4080
4081	if cret == 0 {
4082		return nil
4083	}
4084	cls = &FileBase{}
4085	cls.Ptr = cret
4086	return cls
4087}
4088
4089// Gets the parse name of the @file.
4090// A parse name is a UTF-8 string that describes the
4091// file such that one can get the #GFile back using
4092// g_file_parse_name().
4093//
4094// This is generally used to show the #GFile as a nice
4095// full-pathname kind of string in a user interface,
4096// like in a location entry.
4097//
4098// For local files with names that can safely be converted
4099// to UTF-8 the pathname is used, otherwise the IRI is used
4100// (a form of URI that allows UTF-8 characters unescaped).
4101//
4102// This call does no blocking I/O.
4103func (x *FileBase) GetParseName() string {
4104
4105	cret := XGFileGetParseName(x.GoPointer())
4106	return cret
4107}
4108
4109// Gets the local pathname for #GFile, if one exists. If non-%NULL, this is
4110// guaranteed to be an absolute, canonical path. It might contain symlinks.
4111//
4112// This call does no blocking I/O.
4113func (x *FileBase) GetPath() string {
4114
4115	cret := XGFileGetPath(x.GoPointer())
4116	return cret
4117}
4118
4119// Gets the path for @descendant relative to @parent.
4120//
4121// This call does no blocking I/O.
4122func (x *FileBase) GetRelativePath(DescendantVar File) string {
4123
4124	cret := XGFileGetRelativePath(x.GoPointer(), DescendantVar.GoPointer())
4125	return cret
4126}
4127
4128// Gets the URI for the @file.
4129//
4130// This call does no blocking I/O.
4131func (x *FileBase) GetUri() string {
4132
4133	cret := XGFileGetUri(x.GoPointer())
4134	return cret
4135}
4136
4137// Gets the URI scheme for a #GFile.
4138// RFC 3986 decodes the scheme as:
4139// |[
4140// URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
4141// ]|
4142// Common schemes include "file", "http", "ftp", etc.
4143//
4144// The scheme can be different from the one used to construct the #GFile,
4145// in that it might be replaced with one that is logically equivalent to the #GFile.
4146//
4147// This call does no blocking I/O.
4148func (x *FileBase) GetUriScheme() string {
4149
4150	cret := XGFileGetUriScheme(x.GoPointer())
4151	return cret
4152}
4153
4154// Checks if @file has a parent, and optionally, if it is @parent.
4155//
4156// If @parent is %NULL then this function returns %TRUE if @file has any
4157// parent at all.  If @parent is non-%NULL then %TRUE is only returned
4158// if @file is an immediate child of @parent.
4159func (x *FileBase) HasParent(ParentVar File) bool {
4160
4161	cret := XGFileHasParent(x.GoPointer(), ParentVar.GoPointer())
4162	return cret
4163}
4164
4165// Checks whether @file has the prefix specified by @prefix.
4166//
4167// In other words, if the names of initial elements of @file's
4168// pathname match @prefix. Only full pathname elements are matched,
4169// so a path like /foo is not considered a prefix of /foobar, only
4170// of /foo/bar.
4171//
4172// A #GFile is not a prefix of itself. If you want to check for
4173// equality, use g_file_equal().
4174//
4175// This call does no I/O, as it works purely on names. As such it can
4176// sometimes return %FALSE even if @file is inside a @prefix (from a
4177// filesystem point of view), because the prefix of @file is an alias
4178// of @prefix.
4179func (x *FileBase) HasPrefix(PrefixVar File) bool {
4180
4181	cret := XGFileHasPrefix(x.GoPointer(), PrefixVar.GoPointer())
4182	return cret
4183}
4184
4185// Checks to see if a #GFile has a given URI scheme.
4186//
4187// This call does no blocking I/O.
4188func (x *FileBase) HasUriScheme(UriSchemeVar string) bool {
4189
4190	cret := XGFileHasUriScheme(x.GoPointer(), UriSchemeVar)
4191	return cret
4192}
4193
4194// Creates a hash value for a #GFile.
4195//
4196// This call does no blocking I/O.
4197func (x *FileBase) Hash() uint {
4198
4199	cret := XGFileHash(x.GoPointer())
4200	return cret
4201}
4202
4203// Checks to see if a file is native to the platform.
4204//
4205// A native file is one expressed in the platform-native filename format,
4206// e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
4207// as it might be on a locally mounted remote filesystem.
4208//
4209// On some systems non-native files may be available using the native
4210// filesystem via a userspace filesystem (FUSE), in these cases this call
4211// will return %FALSE, but g_file_get_path() will still return a native path.
4212//
4213// This call does no blocking I/O.
4214func (x *FileBase) IsNative() bool {
4215
4216	cret := XGFileIsNative(x.GoPointer())
4217	return cret
4218}
4219
4220// Loads the contents of @file and returns it as #GBytes.
4221//
4222// If @file is a resource:// based URI, the resulting bytes will reference the
4223// embedded resource instead of a copy. Otherwise, this is equivalent to calling
4224// g_file_load_contents() and g_bytes_new_take().
4225//
4226// For resources, @etag_out will be set to %NULL.
4227//
4228// The data contained in the resulting #GBytes is always zero-terminated, but
4229// this is not included in the #GBytes length. The resulting #GBytes should be
4230// freed with g_bytes_unref() when no longer in use.
4231func (x *FileBase) LoadBytes(CancellableVar *Cancellable, EtagOutVar *string) (*glib.Bytes, error) {
4232	var cerr *glib.Error
4233
4234	cret := XGFileLoadBytes(x.GoPointer(), CancellableVar.GoPointer(), EtagOutVar, &cerr)
4235	if cerr == nil {
4236		return cret, nil
4237	}
4238	return cret, cerr
4239
4240}
4241
4242// Asynchronously loads the contents of @file as #GBytes.
4243//
4244// If @file is a resource:// based URI, the resulting bytes will reference the
4245// embedded resource instead of a copy. Otherwise, this is equivalent to calling
4246// g_file_load_contents_async() and g_bytes_new_take().
4247//
4248// @callback should call g_file_load_bytes_finish() to get the result of this
4249// asynchronous operation.
4250//
4251// See g_file_load_bytes() for more information.
4252func (x *FileBase) LoadBytesAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4253
4254	XGFileLoadBytesAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4255
4256}
4257
4258// Completes an asynchronous request to g_file_load_bytes_async().
4259//
4260// For resources, @etag_out will be set to %NULL.
4261//
4262// The data contained in the resulting #GBytes is always zero-terminated, but
4263// this is not included in the #GBytes length. The resulting #GBytes should be
4264// freed with g_bytes_unref() when no longer in use.
4265//
4266// See g_file_load_bytes() for more information.
4267func (x *FileBase) LoadBytesFinish(ResultVar AsyncResult, EtagOutVar *string) (*glib.Bytes, error) {
4268	var cerr *glib.Error
4269
4270	cret := XGFileLoadBytesFinish(x.GoPointer(), ResultVar.GoPointer(), EtagOutVar, &cerr)
4271	if cerr == nil {
4272		return cret, nil
4273	}
4274	return cret, cerr
4275
4276}
4277
4278// Loads the content of the file into memory. The data is always
4279// zero-terminated, but this is not included in the resultant @length.
4280// The returned @contents should be freed with g_free() when no longer
4281// needed.
4282//
4283// If @cancellable is not %NULL, then the operation can be cancelled by
4284// triggering the cancellable object from another thread. If the operation
4285// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4286func (x *FileBase) LoadContents(CancellableVar *Cancellable, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error) {
4287	var cerr *glib.Error
4288
4289	cret := XGFileLoadContents(x.GoPointer(), CancellableVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
4290	if cerr == nil {
4291		return cret, nil
4292	}
4293	return cret, cerr
4294
4295}
4296
4297// Starts an asynchronous load of the @file's contents.
4298//
4299// For more details, see g_file_load_contents() which is
4300// the synchronous version of this call.
4301//
4302// When the load operation has completed, @callback will be called
4303// with @user data. To finish the operation, call
4304// g_file_load_contents_finish() with the #GAsyncResult returned by
4305// the @callback.
4306//
4307// If @cancellable is not %NULL, then the operation can be cancelled by
4308// triggering the cancellable object from another thread. If the operation
4309// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4310func (x *FileBase) LoadContentsAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4311
4312	XGFileLoadContentsAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4313
4314}
4315
4316// Finishes an asynchronous load of the @file's contents.
4317// The contents are placed in @contents, and @length is set to the
4318// size of the @contents string. The @contents should be freed with
4319// g_free() when no longer needed. If @etag_out is present, it will be
4320// set to the new entity tag for the @file.
4321func (x *FileBase) LoadContentsFinish(ResVar AsyncResult, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error) {
4322	var cerr *glib.Error
4323
4324	cret := XGFileLoadContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
4325	if cerr == nil {
4326		return cret, nil
4327	}
4328	return cret, cerr
4329
4330}
4331
4332// Reads the partial contents of a file. A #GFileReadMoreCallback should
4333// be used to stop reading from the file when appropriate, else this
4334// function will behave exactly as g_file_load_contents_async(). This
4335// operation can be finished by g_file_load_partial_contents_finish().
4336//
4337// Users of this function should be aware that @user_data is passed to
4338// both the @read_more_callback and the @callback.
4339//
4340// If @cancellable is not %NULL, then the operation can be cancelled by
4341// triggering the cancellable object from another thread. If the operation
4342// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4343func (x *FileBase) LoadPartialContentsAsync(CancellableVar *Cancellable, ReadMoreCallbackVar *FileReadMoreCallback, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4344
4345	XGFileLoadPartialContentsAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallback(ReadMoreCallbackVar), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4346
4347}
4348
4349// Finishes an asynchronous partial load operation that was started
4350// with g_file_load_partial_contents_async(). The data is always
4351// zero-terminated, but this is not included in the resultant @length.
4352// The returned @contents should be freed with g_free() when no longer
4353// needed.
4354func (x *FileBase) LoadPartialContentsFinish(ResVar AsyncResult, ContentsVar *[]string, LengthVar *uint, EtagOutVar *string) (bool, error) {
4355	var cerr *glib.Error
4356
4357	cret := XGFileLoadPartialContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
4358	if cerr == nil {
4359		return cret, nil
4360	}
4361	return cret, cerr
4362
4363}
4364
4365// Creates a directory.
4366//
4367// Note that this will only create a child directory
4368// of the immediate parent directory of the path or URI given by the #GFile.
4369// To recursively create directories, see g_file_make_directory_with_parents().
4370//
4371// This function will fail if the parent directory does not exist, setting
4372// @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support
4373// creating directories, this function will fail, setting @error to
4374// %G_IO_ERROR_NOT_SUPPORTED. If the directory already exists,
4375// [error@Gio.IOErrorEnum.EXISTS] will be returned.
4376//
4377// For a local #GFile the newly created directory will have the default
4378// (current) ownership and permissions of the current process.
4379//
4380// If @cancellable is not %NULL, then the operation can be cancelled by
4381// triggering the cancellable object from another thread. If the operation
4382// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4383func (x *FileBase) MakeDirectory(CancellableVar *Cancellable) (bool, error) {
4384	var cerr *glib.Error
4385
4386	cret := XGFileMakeDirectory(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
4387	if cerr == nil {
4388		return cret, nil
4389	}
4390	return cret, cerr
4391
4392}
4393
4394// Asynchronously creates a directory.
4395func (x *FileBase) MakeDirectoryAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4396
4397	XGFileMakeDirectoryAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4398
4399}
4400
4401// Finishes an asynchronous directory creation, started with
4402// g_file_make_directory_async().
4403func (x *FileBase) MakeDirectoryFinish(ResultVar AsyncResult) (bool, error) {
4404	var cerr *glib.Error
4405
4406	cret := XGFileMakeDirectoryFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4407	if cerr == nil {
4408		return cret, nil
4409	}
4410	return cret, cerr
4411
4412}
4413
4414// Creates a directory and any parent directories that may not
4415// exist similar to 'mkdir -p'. If the file system does not support
4416// creating directories, this function will fail, setting @error to
4417// %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists,
4418// this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike
4419// the similar g_mkdir_with_parents().
4420//
4421// For a local #GFile the newly created directories will have the default
4422// (current) ownership and permissions of the current process.
4423//
4424// If @cancellable is not %NULL, then the operation can be cancelled by
4425// triggering the cancellable object from another thread. If the operation
4426// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4427func (x *FileBase) MakeDirectoryWithParents(CancellableVar *Cancellable) (bool, error) {
4428	var cerr *glib.Error
4429
4430	cret := XGFileMakeDirectoryWithParents(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
4431	if cerr == nil {
4432		return cret, nil
4433	}
4434	return cret, cerr
4435
4436}
4437
4438// Creates a symbolic link named @file which contains the string
4439// @symlink_value.
4440//
4441// If @cancellable is not %NULL, then the operation can be cancelled by
4442// triggering the cancellable object from another thread. If the operation
4443// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4444func (x *FileBase) MakeSymbolicLink(SymlinkValueVar string, CancellableVar *Cancellable) (bool, error) {
4445	var cerr *glib.Error
4446
4447	cret := XGFileMakeSymbolicLink(x.GoPointer(), SymlinkValueVar, CancellableVar.GoPointer(), &cerr)
4448	if cerr == nil {
4449		return cret, nil
4450	}
4451	return cret, cerr
4452
4453}
4454
4455// Asynchronously creates a symbolic link named @file which contains the
4456// string @symlink_value.
4457func (x *FileBase) MakeSymbolicLinkAsync(SymlinkValueVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4458
4459	XGFileMakeSymbolicLinkAsync(x.GoPointer(), SymlinkValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4460
4461}
4462
4463// Finishes an asynchronous symbolic link creation, started with
4464// g_file_make_symbolic_link_async().
4465func (x *FileBase) MakeSymbolicLinkFinish(ResultVar AsyncResult) (bool, error) {
4466	var cerr *glib.Error
4467
4468	cret := XGFileMakeSymbolicLinkFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4469	if cerr == nil {
4470		return cret, nil
4471	}
4472	return cret, cerr
4473
4474}
4475
4476// Recursively measures the disk usage of @file.
4477//
4478// This is essentially an analog of the 'du' command, but it also
4479// reports the number of directories and non-directory files encountered
4480// (including things like symbolic links).
4481//
4482// By default, errors are only reported against the toplevel file
4483// itself.  Errors found while recursing are silently ignored, unless
4484// %G_FILE_MEASURE_REPORT_ANY_ERROR is given in @flags.
4485//
4486// The returned size, @disk_usage, is in bytes and should be formatted
4487// with g_format_size() in order to get something reasonable for showing
4488// in a user interface.
4489//
4490// @progress_callback and @progress_data can be given to request
4491// periodic progress updates while scanning.  See the documentation for
4492// #GFileMeasureProgressCallback for information about when and how the
4493// callback will be invoked.
4494func (x *FileBase) MeasureDiskUsage(FlagsVar FileMeasureFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) (bool, error) {
4495	var cerr *glib.Error
4496
4497	cret := XGFileMeasureDiskUsage(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressDataVar, DiskUsageVar, NumDirsVar, NumFilesVar, &cerr)
4498	if cerr == nil {
4499		return cret, nil
4500	}
4501	return cret, cerr
4502
4503}
4504
4505// Recursively measures the disk usage of @file.
4506//
4507// This is the asynchronous version of g_file_measure_disk_usage().  See
4508// there for more information.
4509func (x *FileBase) MeasureDiskUsageAsync(FlagsVar FileMeasureFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileMeasureProgressCallback, ProgressDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4510
4511	XGFileMeasureDiskUsageAsync(x.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
4512
4513}
4514
4515// Collects the results from an earlier call to
4516// g_file_measure_disk_usage_async().  See g_file_measure_disk_usage() for
4517// more information.
4518func (x *FileBase) MeasureDiskUsageFinish(ResultVar AsyncResult, DiskUsageVar *uint64, NumDirsVar *uint64, NumFilesVar *uint64) (bool, error) {
4519	var cerr *glib.Error
4520
4521	cret := XGFileMeasureDiskUsageFinish(x.GoPointer(), ResultVar.GoPointer(), DiskUsageVar, NumDirsVar, NumFilesVar, &cerr)
4522	if cerr == nil {
4523		return cret, nil
4524	}
4525	return cret, cerr
4526
4527}
4528
4529// Obtains a file or directory monitor for the given file,
4530// depending on the type of the file.
4531//
4532// If @cancellable is not %NULL, then the operation can be cancelled by
4533// triggering the cancellable object from another thread. If the operation
4534// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4535func (x *FileBase) Monitor(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
4536	var cls *FileMonitor
4537	var cerr *glib.Error
4538
4539	cret := XGFileMonitor(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
4540
4541	if cret == 0 {
4542		return nil, cerr
4543	}
4544	cls = &FileMonitor{}
4545	cls.Ptr = cret
4546	if cerr == nil {
4547		return cls, nil
4548	}
4549	return cls, cerr
4550
4551}
4552
4553// Obtains a directory monitor for the given file.
4554// This may fail if directory monitoring is not supported.
4555//
4556// If @cancellable is not %NULL, then the operation can be cancelled by
4557// triggering the cancellable object from another thread. If the operation
4558// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4559//
4560// It does not make sense for @flags to contain
4561// %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to
4562// directories.  It is not possible to monitor all the files in a
4563// directory for changes made via hard links; if you want to do this then
4564// you must register individual watches with g_file_monitor().
4565func (x *FileBase) MonitorDirectory(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
4566	var cls *FileMonitor
4567	var cerr *glib.Error
4568
4569	cret := XGFileMonitorDirectory(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
4570
4571	if cret == 0 {
4572		return nil, cerr
4573	}
4574	cls = &FileMonitor{}
4575	cls.Ptr = cret
4576	if cerr == nil {
4577		return cls, nil
4578	}
4579	return cls, cerr
4580
4581}
4582
4583// Obtains a file monitor for the given file. If no file notification
4584// mechanism exists, then regular polling of the file is used.
4585//
4586// If @cancellable is not %NULL, then the operation can be cancelled by
4587// triggering the cancellable object from another thread. If the operation
4588// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4589//
4590// If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor
4591// will also attempt to report changes made to the file via another
4592// filename (ie, a hard link). Without this flag, you can only rely on
4593// changes made through the filename contained in @file to be
4594// reported. Using this flag may result in an increase in resource
4595// usage, and may not have any effect depending on the #GFileMonitor
4596// backend and/or filesystem type.
4597func (x *FileBase) MonitorFile(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
4598	var cls *FileMonitor
4599	var cerr *glib.Error
4600
4601	cret := XGFileMonitorFile(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
4602
4603	if cret == 0 {
4604		return nil, cerr
4605	}
4606	cls = &FileMonitor{}
4607	cls.Ptr = cret
4608	if cerr == nil {
4609		return cls, nil
4610	}
4611	return cls, cerr
4612
4613}
4614
4615// Starts a @mount_operation, mounting the volume that contains
4616// the file @location.
4617//
4618// When this operation has completed, @callback will be called with
4619// @user_user data, and the operation can be finalized with
4620// g_file_mount_enclosing_volume_finish().
4621//
4622// If @cancellable is not %NULL, then the operation can be cancelled by
4623// triggering the cancellable object from another thread. If the operation
4624// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4625func (x *FileBase) MountEnclosingVolume(FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4626
4627	XGFileMountEnclosingVolume(x.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4628
4629}
4630
4631// Finishes a mount operation started by g_file_mount_enclosing_volume().
4632func (x *FileBase) MountEnclosingVolumeFinish(ResultVar AsyncResult) (bool, error) {
4633	var cerr *glib.Error
4634
4635	cret := XGFileMountEnclosingVolumeFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4636	if cerr == nil {
4637		return cret, nil
4638	}
4639	return cret, cerr
4640
4641}
4642
4643// Mounts a file of type G_FILE_TYPE_MOUNTABLE.
4644// Using @mount_operation, you can request callbacks when, for instance,
4645// passwords are needed during authentication.
4646//
4647// If @cancellable is not %NULL, then the operation can be cancelled by
4648// triggering the cancellable object from another thread. If the operation
4649// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4650//
4651// When the operation is finished, @callback will be called.
4652// You can then call g_file_mount_mountable_finish() to get
4653// the result of the operation.
4654func (x *FileBase) MountMountable(FlagsVar MountMountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4655
4656	XGFileMountMountable(x.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4657
4658}
4659
4660// Finishes a mount operation. See g_file_mount_mountable() for details.
4661//
4662// Finish an asynchronous mount operation that was started
4663// with g_file_mount_mountable().
4664func (x *FileBase) MountMountableFinish(ResultVar AsyncResult) (*FileBase, error) {
4665	var cls *FileBase
4666	var cerr *glib.Error
4667
4668	cret := XGFileMountMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4669
4670	if cret == 0 {
4671		return nil, cerr
4672	}
4673	cls = &FileBase{}
4674	cls.Ptr = cret
4675	if cerr == nil {
4676		return cls, nil
4677	}
4678	return cls, cerr
4679
4680}
4681
4682// Tries to move the file or directory @source to the location specified
4683// by @destination. If native move operations are supported then this is
4684// used, otherwise a copy + delete fallback is used. The native
4685// implementation may support moving directories (for instance on moves
4686// inside the same filesystem), but the fallback code does not.
4687//
4688// If the flag %G_FILE_COPY_OVERWRITE is specified an already
4689// existing @destination file is overwritten.
4690//
4691// If @cancellable is not %NULL, then the operation can be cancelled by
4692// triggering the cancellable object from another thread. If the operation
4693// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4694//
4695// If @progress_callback is not %NULL, then the operation can be monitored
4696// by setting this to a #GFileProgressCallback function.
4697// @progress_callback_data will be passed to this function. It is
4698// guaranteed that this callback will be called after all data has been
4699// transferred with the total number of bytes copied during the operation.
4700//
4701// If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND
4702// error is returned, independent on the status of the @destination.
4703//
4704// If %G_FILE_COPY_OVERWRITE is not specified and the target exists,
4705// then the error %G_IO_ERROR_EXISTS is returned.
4706//
4707// If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
4708// error is returned. If trying to overwrite a directory with a directory the
4709// %G_IO_ERROR_WOULD_MERGE error is returned.
4710//
4711// If the source is a directory and the target does not exist, or
4712// %G_FILE_COPY_OVERWRITE is specified and the target is a file, then
4713// the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native
4714// move operation isn't available).
4715func (x *FileBase) Move(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error) {
4716	var cerr *glib.Error
4717
4718	cret := XGFileMove(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, &cerr)
4719	if cerr == nil {
4720		return cret, nil
4721	}
4722	return cret, cerr
4723
4724}
4725
4726// Asynchronously moves a file @source to the location of @destination. For details of the behaviour, see g_file_move().
4727//
4728// If @progress_callback is not %NULL, then that function that will be called
4729// just like in g_file_move(). The callback will run in the default main context
4730// of the thread calling g_file_move_async() — the same context as @callback is
4731// run in.
4732//
4733// When the operation is finished, @callback will be called. You can then call
4734// g_file_move_finish() to get the result of the operation.
4735func (x *FileBase) MoveAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackVar *FileProgressCallback, ProgressCallbackDataVar uintptr, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4736
4737	XGFileMoveAsync(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(ProgressCallbackVar), ProgressCallbackDataVar, glib.NewCallbackNullable(CallbackVar), UserDataVar)
4738
4739}
4740
4741// Version of [method@Gio.File.move_async] using closures instead of callbacks for
4742// easier binding in other languages.
4743func (x *FileBase) MoveAsyncWithClosures(DestinationVar File, FlagsVar FileCopyFlags, IoPriorityVar int, CancellableVar *Cancellable, ProgressCallbackClosureVar *gobject.Closure, ReadyCallbackClosureVar *gobject.Closure) {
4744
4745	XGFileMoveAsyncWithClosures(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), ProgressCallbackClosureVar, ReadyCallbackClosureVar)
4746
4747}
4748
4749// Finishes an asynchronous file movement, started with
4750// g_file_move_async().
4751func (x *FileBase) MoveFinish(ResultVar AsyncResult) (bool, error) {
4752	var cerr *glib.Error
4753
4754	cret := XGFileMoveFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4755	if cerr == nil {
4756		return cret, nil
4757	}
4758	return cret, cerr
4759
4760}
4761
4762// Opens an existing file for reading and writing. The result is
4763// a #GFileIOStream that can be used to read and write the contents
4764// of the file.
4765//
4766// If @cancellable is not %NULL, then the operation can be cancelled
4767// by triggering the cancellable object from another thread. If the
4768// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
4769// returned.
4770//
4771// If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
4772// be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
4773// error will be returned. Other errors are possible too, and depend on
4774// what kind of filesystem the file is on. Note that in many non-local
4775// file cases read and write streams are not supported, so make sure you
4776// really need to do read and write streaming, rather than just opening
4777// for reading or writing.
4778func (x *FileBase) OpenReadwrite(CancellableVar *Cancellable) (*FileIOStream, error) {
4779	var cls *FileIOStream
4780	var cerr *glib.Error
4781
4782	cret := XGFileOpenReadwrite(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
4783
4784	if cret == 0 {
4785		return nil, cerr
4786	}
4787	cls = &FileIOStream{}
4788	cls.Ptr = cret
4789	if cerr == nil {
4790		return cls, nil
4791	}
4792	return cls, cerr
4793
4794}
4795
4796// Asynchronously opens @file for reading and writing.
4797//
4798// For more details, see g_file_open_readwrite() which is
4799// the synchronous version of this call.
4800//
4801// When the operation is finished, @callback will be called.
4802// You can then call g_file_open_readwrite_finish() to get
4803// the result of the operation.
4804func (x *FileBase) OpenReadwriteAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4805
4806	XGFileOpenReadwriteAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4807
4808}
4809
4810// Finishes an asynchronous file read operation started with
4811// g_file_open_readwrite_async().
4812func (x *FileBase) OpenReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
4813	var cls *FileIOStream
4814	var cerr *glib.Error
4815
4816	cret := XGFileOpenReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
4817
4818	if cret == 0 {
4819		return nil, cerr
4820	}
4821	cls = &FileIOStream{}
4822	cls.Ptr = cret
4823	if cerr == nil {
4824		return cls, nil
4825	}
4826	return cls, cerr
4827
4828}
4829
4830// Exactly like g_file_get_path(), but caches the result via
4831// g_object_set_qdata_full().  This is useful for example in C
4832// applications which mix `g_file_*` APIs with native ones.  It
4833// also avoids an extra duplicated string when possible, so will be
4834// generally more efficient.
4835//
4836// This call does no blocking I/O.
4837func (x *FileBase) PeekPath() string {
4838
4839	cret := XGFilePeekPath(x.GoPointer())
4840	return cret
4841}
4842
4843// Polls a file of type %G_FILE_TYPE_MOUNTABLE.
4844//
4845// If @cancellable is not %NULL, then the operation can be cancelled by
4846// triggering the cancellable object from another thread. If the operation
4847// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4848//
4849// When the operation is finished, @callback will be called.
4850// You can then call g_file_mount_mountable_finish() to get
4851// the result of the operation.
4852func (x *FileBase) PollMountable(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4853
4854	XGFilePollMountable(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4855
4856}
4857
4858// Finishes a poll operation. See g_file_poll_mountable() for details.
4859//
4860// Finish an asynchronous poll operation that was polled
4861// with g_file_poll_mountable().
4862func (x *FileBase) PollMountableFinish(ResultVar AsyncResult) (bool, error) {
4863	var cerr *glib.Error
4864
4865	cret := XGFilePollMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4866	if cerr == nil {
4867		return cret, nil
4868	}
4869	return cret, cerr
4870
4871}
4872
4873// Returns the #GAppInfo that is registered as the default
4874// application to handle the file specified by @file.
4875//
4876// If @cancellable is not %NULL, then the operation can be cancelled by
4877// triggering the cancellable object from another thread. If the operation
4878// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4879func (x *FileBase) QueryDefaultHandler(CancellableVar *Cancellable) (*AppInfoBase, error) {
4880	var cls *AppInfoBase
4881	var cerr *glib.Error
4882
4883	cret := XGFileQueryDefaultHandler(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
4884
4885	if cret == 0 {
4886		return nil, cerr
4887	}
4888	cls = &AppInfoBase{}
4889	cls.Ptr = cret
4890	if cerr == nil {
4891		return cls, nil
4892	}
4893	return cls, cerr
4894
4895}
4896
4897// Async version of g_file_query_default_handler().
4898func (x *FileBase) QueryDefaultHandlerAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
4899
4900	XGFileQueryDefaultHandlerAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
4901
4902}
4903
4904// Finishes a g_file_query_default_handler_async() operation.
4905func (x *FileBase) QueryDefaultHandlerFinish(ResultVar AsyncResult) (*AppInfoBase, error) {
4906	var cls *AppInfoBase
4907	var cerr *glib.Error
4908
4909	cret := XGFileQueryDefaultHandlerFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
4910
4911	if cret == 0 {
4912		return nil, cerr
4913	}
4914	cls = &AppInfoBase{}
4915	cls.Ptr = cret
4916	if cerr == nil {
4917		return cls, nil
4918	}
4919	return cls, cerr
4920
4921}
4922
4923// Utility function to check if a particular file exists.
4924//
4925// The fallback implementation of this API is using [method@Gio.File.query_info]
4926// and therefore may do blocking I/O. To asynchronously query the existence
4927// of a file, use [method@Gio.File.query_info_async].
4928//
4929// Note that in many cases it is [racy to first check for file existence](https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use)
4930// and then execute something based on the outcome of that, because the
4931// file might have been created or removed in between the operations. The
4932// general approach to handling that is to not check, but just do the
4933// operation and handle the errors as they come.
4934//
4935// As an example of race-free checking, take the case of reading a file,
4936// and if it doesn't exist, creating it. There are two racy versions: read
4937// it, and on error create it; and: check if it exists, if not create it.
4938// These can both result in two processes creating the file (with perhaps
4939// a partially written file as the result). The correct approach is to
4940// always try to create the file with g_file_create() which will either
4941// atomically create the file or fail with a %G_IO_ERROR_EXISTS error.
4942//
4943// However, in many cases an existence check is useful in a user interface,
4944// for instance to make a menu item sensitive/insensitive, so that you don't
4945// have to fool users that something is possible and then just show an error
4946// dialog. If you do this, you should make sure to also handle the errors
4947// that can happen due to races when you execute the operation.
4948func (x *FileBase) QueryExists(CancellableVar *Cancellable) bool {
4949
4950	cret := XGFileQueryExists(x.GoPointer(), CancellableVar.GoPointer())
4951	return cret
4952}
4953
4954// Utility function to inspect the #GFileType of a file. This is
4955// implemented using g_file_query_info() and as such does blocking I/O.
4956//
4957// The primary use case of this method is to check if a file is
4958// a regular file, directory, or symlink.
4959func (x *FileBase) QueryFileType(FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) FileType {
4960
4961	cret := XGFileQueryFileType(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())
4962	return cret
4963}
4964
4965// Similar to g_file_query_info(), but obtains information
4966// about the filesystem the @file is on, rather than the file itself.
4967// For instance the amount of space available and the type of
4968// the filesystem.
4969//
4970// The @attributes value is a string that specifies the attributes
4971// that should be gathered. It is not an error if it's not possible
4972// to read a particular requested attribute from a file - it just
4973// won't be set. @attributes should be a comma-separated list of
4974// attributes or attribute wildcards. The wildcard "*" means all
4975// attributes, and a wildcard like "filesystem::*" means all attributes
4976// in the filesystem namespace. The standard namespace for filesystem
4977// attributes is "filesystem". Common attributes of interest are
4978// %G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem
4979// in bytes), %G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available),
4980// and %G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
4981//
4982// If @cancellable is not %NULL, then the operation can be cancelled
4983// by triggering the cancellable object from another thread. If the
4984// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
4985// returned.
4986//
4987// If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
4988// be returned. Other errors are possible too, and depend on what
4989// kind of filesystem the file is on.
4990func (x *FileBase) QueryFilesystemInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error) {
4991	var cls *FileInfo
4992	var cerr *glib.Error
4993
4994	cret := XGFileQueryFilesystemInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer(), &cerr)
4995
4996	if cret == 0 {
4997		return nil, cerr
4998	}
4999	cls = &FileInfo{}
5000	cls.Ptr = cret
5001	if cerr == nil {
5002		return cls, nil
5003	}
5004	return cls, cerr
5005
5006}
5007
5008// Asynchronously gets the requested information about the filesystem
5009// that the specified @file is on. The result is a #GFileInfo object
5010// that contains key-value attributes (such as type or size for the
5011// file).
5012//
5013// For more details, see g_file_query_filesystem_info() which is the
5014// synchronous version of this call.
5015//
5016// When the operation is finished, @callback will be called. You can
5017// then call g_file_query_info_finish() to get the result of the
5018// operation.
5019func (x *FileBase) QueryFilesystemInfoAsync(AttributesVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5020
5021	XGFileQueryFilesystemInfoAsync(x.GoPointer(), AttributesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5022
5023}
5024
5025// Finishes an asynchronous filesystem info query.
5026// See g_file_query_filesystem_info_async().
5027func (x *FileBase) QueryFilesystemInfoFinish(ResVar AsyncResult) (*FileInfo, error) {
5028	var cls *FileInfo
5029	var cerr *glib.Error
5030
5031	cret := XGFileQueryFilesystemInfoFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5032
5033	if cret == 0 {
5034		return nil, cerr
5035	}
5036	cls = &FileInfo{}
5037	cls.Ptr = cret
5038	if cerr == nil {
5039		return cls, nil
5040	}
5041	return cls, cerr
5042
5043}
5044
5045// Gets the requested information about specified @file.
5046//
5047// The result is a [class@Gio.FileInfo] object that contains key-value
5048// attributes (such as the type or size of the file).
5049//
5050// The @attributes value is a string that specifies the file
5051// attributes that should be gathered. It is not an error if
5052// it’s not possible to read a particular requested attribute
5053// from a file — it just won't be set. In particular this means that if a file
5054// is inaccessible (due to being in a folder with restrictive permissions), for
5055// example, you can expect the returned [class@Gio.FileInfo] to have very few
5056// attributes set. You should check whether an attribute is set using
5057// [method@Gio.FileInfo.has_attribute] before trying to retrieve its value.
5058//
5059// It is guaranteed that if any of the following attributes are listed in
5060// @attributes, they will always be set in the returned [class@Gio.FileInfo],
5061// even if the user doesn’t have permissions to access the file:
5062//
5063//   - [const@Gio.FILE_ATTRIBUTE_STANDARD_NAME]
5064//   - [const@Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME]
5065//
5066// @attributes should be a comma-separated list of attributes or attribute
5067// wildcards. The wildcard `"*"` means all attributes, and a wildcard like
5068// `"standard::*"` means all attributes in the standard namespace.
5069// An example attribute query might be `"standard::*,owner::user"`.
5070// The standard attributes are available as defines, like
5071// [const@Gio.FILE_ATTRIBUTE_STANDARD_NAME].
5072//
5073// If @cancellable is not `NULL`, then the operation can be cancelled
5074// by triggering the cancellable object from another thread. If the
5075// operation was cancelled, the error [error@Gio.IOErrorEnum.CANCELLED] will be
5076// returned.
5077//
5078// For symlinks, normally the information about the target of the
5079// symlink is returned, rather than information about the symlink
5080// itself. However if you pass [flags@Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS]
5081// in @flags the information about the symlink itself will be returned.
5082// Also, for symlinks that point to non-existing files the information
5083// about the symlink itself will be returned.
5084//
5085// If the file does not exist, the [error@Gio.IOErrorEnum.NOT_FOUND] error will be
5086// returned. Other errors are possible too, and depend on what kind of
5087// file system the file is on.
5088func (x *FileBase) QueryInfo(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileInfo, error) {
5089	var cls *FileInfo
5090	var cerr *glib.Error
5091
5092	cret := XGFileQueryInfo(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5093
5094	if cret == 0 {
5095		return nil, cerr
5096	}
5097	cls = &FileInfo{}
5098	cls.Ptr = cret
5099	if cerr == nil {
5100		return cls, nil
5101	}
5102	return cls, cerr
5103
5104}
5105
5106// Asynchronously gets the requested information about specified @file.
5107// The result is a #GFileInfo object that contains key-value attributes
5108// (such as type or size for the file).
5109//
5110// For more details, see g_file_query_info() which is the synchronous
5111// version of this call.
5112//
5113// When the operation is finished, @callback will be called. You can
5114// then call g_file_query_info_finish() to get the result of the operation.
5115func (x *FileBase) QueryInfoAsync(AttributesVar string, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5116
5117	XGFileQueryInfoAsync(x.GoPointer(), AttributesVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5118
5119}
5120
5121// Finishes an asynchronous file info query.
5122// See g_file_query_info_async().
5123func (x *FileBase) QueryInfoFinish(ResVar AsyncResult) (*FileInfo, error) {
5124	var cls *FileInfo
5125	var cerr *glib.Error
5126
5127	cret := XGFileQueryInfoFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5128
5129	if cret == 0 {
5130		return nil, cerr
5131	}
5132	cls = &FileInfo{}
5133	cls.Ptr = cret
5134	if cerr == nil {
5135		return cls, nil
5136	}
5137	return cls, cerr
5138
5139}
5140
5141// Obtain the list of settable attributes for the file.
5142//
5143// Returns the type and full attribute name of all the attributes
5144// that can be set on this file. This doesn't mean setting it will
5145// always succeed though, you might get an access failure, or some
5146// specific file may not support a specific attribute.
5147//
5148// If @cancellable is not %NULL, then the operation can be cancelled by
5149// triggering the cancellable object from another thread. If the operation
5150// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5151func (x *FileBase) QuerySettableAttributes(CancellableVar *Cancellable) (*FileAttributeInfoList, error) {
5152	var cerr *glib.Error
5153
5154	cret := XGFileQuerySettableAttributes(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5155	if cerr == nil {
5156		return cret, nil
5157	}
5158	return cret, cerr
5159
5160}
5161
5162// Obtain the list of attribute namespaces where new attributes
5163// can be created by a user. An example of this is extended
5164// attributes (in the "xattr" namespace).
5165//
5166// If @cancellable is not %NULL, then the operation can be cancelled by
5167// triggering the cancellable object from another thread. If the operation
5168// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5169func (x *FileBase) QueryWritableNamespaces(CancellableVar *Cancellable) (*FileAttributeInfoList, error) {
5170	var cerr *glib.Error
5171
5172	cret := XGFileQueryWritableNamespaces(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5173	if cerr == nil {
5174		return cret, nil
5175	}
5176	return cret, cerr
5177
5178}
5179
5180// Opens a file for reading. The result is a #GFileInputStream that
5181// can be used to read the contents of the file.
5182//
5183// If @cancellable is not %NULL, then the operation can be cancelled by
5184// triggering the cancellable object from another thread. If the operation
5185// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5186//
5187// If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
5188// returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
5189// error will be returned. Other errors are possible too, and depend
5190// on what kind of filesystem the file is on.
5191func (x *FileBase) Read(CancellableVar *Cancellable) (*FileInputStream, error) {
5192	var cls *FileInputStream
5193	var cerr *glib.Error
5194
5195	cret := XGFileRead(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5196
5197	if cret == 0 {
5198		return nil, cerr
5199	}
5200	cls = &FileInputStream{}
5201	cls.Ptr = cret
5202	if cerr == nil {
5203		return cls, nil
5204	}
5205	return cls, cerr
5206
5207}
5208
5209// Asynchronously opens @file for reading.
5210//
5211// For more details, see g_file_read() which is
5212// the synchronous version of this call.
5213//
5214// When the operation is finished, @callback will be called.
5215// You can then call g_file_read_finish() to get the result
5216// of the operation.
5217func (x *FileBase) ReadAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5218
5219	XGFileReadAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5220
5221}
5222
5223// Finishes an asynchronous file read operation started with
5224// g_file_read_async().
5225func (x *FileBase) ReadFinish(ResVar AsyncResult) (*FileInputStream, error) {
5226	var cls *FileInputStream
5227	var cerr *glib.Error
5228
5229	cret := XGFileReadFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5230
5231	if cret == 0 {
5232		return nil, cerr
5233	}
5234	cls = &FileInputStream{}
5235	cls.Ptr = cret
5236	if cerr == nil {
5237		return cls, nil
5238	}
5239	return cls, cerr
5240
5241}
5242
5243// Returns an output stream for overwriting the file, possibly
5244// creating a backup copy of the file first. If the file doesn't exist,
5245// it will be created.
5246//
5247// This will try to replace the file in the safest way possible so
5248// that any errors during the writing will not affect an already
5249// existing copy of the file. For instance, for local files it
5250// may write to a temporary file and then atomically rename over
5251// the destination when the stream is closed.
5252//
5253// By default files created are generally readable by everyone,
5254// but if you pass %G_FILE_CREATE_PRIVATE in @flags the file
5255// will be made readable only to the current user, to the level that
5256// is supported on the target filesystem.
5257//
5258// If @cancellable is not %NULL, then the operation can be cancelled
5259// by triggering the cancellable object from another thread. If the
5260// operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
5261// returned.
5262//
5263// If you pass in a non-%NULL @etag value and @file already exists, then
5264// this value is compared to the current entity tag of the file, and if
5265// they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This
5266// generally means that the file has been changed since you last read
5267// it. You can get the new etag from g_file_output_stream_get_etag()
5268// after you've finished writing and closed the #GFileOutputStream. When
5269// you load a new file you can use g_file_input_stream_query_info() to
5270// get the etag of the file.
5271//
5272// If @make_backup is %TRUE, this function will attempt to make a
5273// backup of the current file before overwriting it. If this fails
5274// a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you
5275// want to replace anyway, try again with @make_backup set to %FALSE.
5276//
5277// If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will
5278// be returned, and if the file is some other form of non-regular file
5279// then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some
5280// file systems don't allow all file names, and may return an
5281// %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long
5282// %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are
5283// possible too, and depend on what kind of filesystem the file is on.
5284func (x *FileBase) Replace(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
5285	var cls *FileOutputStream
5286	var cerr *glib.Error
5287
5288	EtagVarPtr := core.GStrdupNullable(EtagVar)
5289	defer core.GFreeNullable(EtagVarPtr)
5290
5291	cret := XGFileReplace(x.GoPointer(), EtagVarPtr, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5292
5293	if cret == 0 {
5294		return nil, cerr
5295	}
5296	cls = &FileOutputStream{}
5297	cls.Ptr = cret
5298	if cerr == nil {
5299		return cls, nil
5300	}
5301	return cls, cerr
5302
5303}
5304
5305// Asynchronously overwrites the file, replacing the contents,
5306// possibly creating a backup copy of the file first.
5307//
5308// For more details, see g_file_replace() which is
5309// the synchronous version of this call.
5310//
5311// When the operation is finished, @callback will be called.
5312// You can then call g_file_replace_finish() to get the result
5313// of the operation.
5314func (x *FileBase) ReplaceAsync(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5315
5316	EtagVarPtr := core.GStrdupNullable(EtagVar)
5317	defer core.GFreeNullable(EtagVarPtr)
5318
5319	XGFileReplaceAsync(x.GoPointer(), EtagVarPtr, MakeBackupVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5320
5321}
5322
5323// Replaces the contents of @file with @contents of @length bytes.
5324//
5325// If @etag is specified (not %NULL), any existing file must have that etag,
5326// or the error %G_IO_ERROR_WRONG_ETAG will be returned.
5327//
5328// If @make_backup is %TRUE, this function will attempt to make a backup
5329// of @file. Internally, it uses g_file_replace(), so will try to replace the
5330// file contents in the safest way possible. For example, atomic renames are
5331// used when replacing local files’ contents.
5332//
5333// If @cancellable is not %NULL, then the operation can be cancelled by
5334// triggering the cancellable object from another thread. If the operation
5335// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5336//
5337// The returned @new_etag can be used to verify that the file hasn't
5338// changed the next time it is saved over.
5339func (x *FileBase) ReplaceContents(ContentsVar string, LengthVar uint, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, NewEtagVar *string, CancellableVar *Cancellable) (bool, error) {
5340	var cerr *glib.Error
5341
5342	EtagVarPtr := core.GStrdupNullable(EtagVar)
5343	defer core.GFreeNullable(EtagVarPtr)
5344
5345	cret := XGFileReplaceContents(x.GoPointer(), ContentsVar, LengthVar, EtagVarPtr, MakeBackupVar, FlagsVar, NewEtagVar, CancellableVar.GoPointer(), &cerr)
5346	if cerr == nil {
5347		return cret, nil
5348	}
5349	return cret, cerr
5350
5351}
5352
5353// Starts an asynchronous replacement of @file with the given
5354// @contents of @length bytes. @etag will replace the document's
5355// current entity tag.
5356//
5357// When this operation has completed, @callback will be called with
5358// @user_user data, and the operation can be finalized with
5359// g_file_replace_contents_finish().
5360//
5361// If @cancellable is not %NULL, then the operation can be cancelled by
5362// triggering the cancellable object from another thread. If the operation
5363// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5364//
5365// If @make_backup is %TRUE, this function will attempt to
5366// make a backup of @file.
5367//
5368// Note that no copy of @contents will be made, so it must stay valid
5369// until @callback is called. See g_file_replace_contents_bytes_async()
5370// for a #GBytes version that will automatically hold a reference to the
5371// contents (without copying) for the duration of the call.
5372func (x *FileBase) ReplaceContentsAsync(ContentsVar string, LengthVar uint, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5373
5374	EtagVarPtr := core.GStrdupNullable(EtagVar)
5375	defer core.GFreeNullable(EtagVarPtr)
5376
5377	XGFileReplaceContentsAsync(x.GoPointer(), ContentsVar, LengthVar, EtagVarPtr, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5378
5379}
5380
5381// Same as g_file_replace_contents_async() but takes a #GBytes input instead.
5382// This function will keep a ref on @contents until the operation is done.
5383// Unlike g_file_replace_contents_async() this allows forgetting about the
5384// content without waiting for the callback.
5385//
5386// When this operation has completed, @callback will be called with
5387// @user_user data, and the operation can be finalized with
5388// g_file_replace_contents_finish().
5389func (x *FileBase) ReplaceContentsBytesAsync(ContentsVar *glib.Bytes, EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5390
5391	EtagVarPtr := core.GStrdupNullable(EtagVar)
5392	defer core.GFreeNullable(EtagVarPtr)
5393
5394	XGFileReplaceContentsBytesAsync(x.GoPointer(), ContentsVar, EtagVarPtr, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5395
5396}
5397
5398// Finishes an asynchronous replace of the given @file. See
5399// g_file_replace_contents_async(). Sets @new_etag to the new entity
5400// tag for the document, if present.
5401func (x *FileBase) ReplaceContentsFinish(ResVar AsyncResult, NewEtagVar *string) (bool, error) {
5402	var cerr *glib.Error
5403
5404	cret := XGFileReplaceContentsFinish(x.GoPointer(), ResVar.GoPointer(), NewEtagVar, &cerr)
5405	if cerr == nil {
5406		return cret, nil
5407	}
5408	return cret, cerr
5409
5410}
5411
5412// Finishes an asynchronous file replace operation started with
5413// g_file_replace_async().
5414func (x *FileBase) ReplaceFinish(ResVar AsyncResult) (*FileOutputStream, error) {
5415	var cls *FileOutputStream
5416	var cerr *glib.Error
5417
5418	cret := XGFileReplaceFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5419
5420	if cret == 0 {
5421		return nil, cerr
5422	}
5423	cls = &FileOutputStream{}
5424	cls.Ptr = cret
5425	if cerr == nil {
5426		return cls, nil
5427	}
5428	return cls, cerr
5429
5430}
5431
5432// Returns an output stream for overwriting the file in readwrite mode,
5433// possibly creating a backup copy of the file first. If the file doesn't
5434// exist, it will be created.
5435//
5436// For details about the behaviour, see g_file_replace() which does the
5437// same thing but returns an output stream only.
5438//
5439// Note that in many non-local file cases read and write streams are not
5440// supported, so make sure you really need to do read and write streaming,
5441// rather than just opening for reading or writing.
5442func (x *FileBase) ReplaceReadwrite(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error) {
5443	var cls *FileIOStream
5444	var cerr *glib.Error
5445
5446	EtagVarPtr := core.GStrdupNullable(EtagVar)
5447	defer core.GFreeNullable(EtagVarPtr)
5448
5449	cret := XGFileReplaceReadwrite(x.GoPointer(), EtagVarPtr, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5450
5451	if cret == 0 {
5452		return nil, cerr
5453	}
5454	cls = &FileIOStream{}
5455	cls.Ptr = cret
5456	if cerr == nil {
5457		return cls, nil
5458	}
5459	return cls, cerr
5460
5461}
5462
5463// Asynchronously overwrites the file in read-write mode,
5464// replacing the contents, possibly creating a backup copy
5465// of the file first.
5466//
5467// For more details, see g_file_replace_readwrite() which is
5468// the synchronous version of this call.
5469//
5470// When the operation is finished, @callback will be called.
5471// You can then call g_file_replace_readwrite_finish() to get
5472// the result of the operation.
5473func (x *FileBase) ReplaceReadwriteAsync(EtagVar *string, MakeBackupVar bool, FlagsVar FileCreateFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5474
5475	EtagVarPtr := core.GStrdupNullable(EtagVar)
5476	defer core.GFreeNullable(EtagVarPtr)
5477
5478	XGFileReplaceReadwriteAsync(x.GoPointer(), EtagVarPtr, MakeBackupVar, FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5479
5480}
5481
5482// Finishes an asynchronous file replace operation started with
5483// g_file_replace_readwrite_async().
5484func (x *FileBase) ReplaceReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
5485	var cls *FileIOStream
5486	var cerr *glib.Error
5487
5488	cret := XGFileReplaceReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5489
5490	if cret == 0 {
5491		return nil, cerr
5492	}
5493	cls = &FileIOStream{}
5494	cls.Ptr = cret
5495	if cerr == nil {
5496		return cls, nil
5497	}
5498	return cls, cerr
5499
5500}
5501
5502// Resolves a relative path for @file to an absolute path.
5503//
5504// This call does no blocking I/O.
5505//
5506// If the @relative_path is an absolute path name, the resolution
5507// is done absolutely (without taking @file path as base).
5508func (x *FileBase) ResolveRelativePath(RelativePathVar string) *FileBase {
5509	var cls *FileBase
5510
5511	cret := XGFileResolveRelativePath(x.GoPointer(), RelativePathVar)
5512
5513	if cret == 0 {
5514		return nil
5515	}
5516	cls = &FileBase{}
5517	cls.Ptr = cret
5518	return cls
5519}
5520
5521// Sets an attribute in the file with attribute name @attribute to @value_p.
5522//
5523// Some attributes can be unset by setting @type to
5524// %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
5525//
5526// If @cancellable is not %NULL, then the operation can be cancelled by
5527// triggering the cancellable object from another thread. If the operation
5528// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5529func (x *FileBase) SetAttribute(AttributeVar string, TypeVar FileAttributeType, ValuePVar uintptr, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5530	var cerr *glib.Error
5531
5532	cret := XGFileSetAttribute(x.GoPointer(), AttributeVar, TypeVar, ValuePVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5533	if cerr == nil {
5534		return cret, nil
5535	}
5536	return cret, cerr
5537
5538}
5539
5540// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
5541// If @attribute is of a different type, this operation will fail,
5542// returning %FALSE.
5543//
5544// If @cancellable is not %NULL, then the operation can be cancelled by
5545// triggering the cancellable object from another thread. If the operation
5546// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5547func (x *FileBase) SetAttributeByteString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5548	var cerr *glib.Error
5549
5550	cret := XGFileSetAttributeByteString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5551	if cerr == nil {
5552		return cret, nil
5553	}
5554	return cret, cerr
5555
5556}
5557
5558// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
5559// If @attribute is of a different type, this operation will fail.
5560//
5561// If @cancellable is not %NULL, then the operation can be cancelled by
5562// triggering the cancellable object from another thread. If the operation
5563// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5564func (x *FileBase) SetAttributeInt32(AttributeVar string, ValueVar int32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5565	var cerr *glib.Error
5566
5567	cret := XGFileSetAttributeInt32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5568	if cerr == nil {
5569		return cret, nil
5570	}
5571	return cret, cerr
5572
5573}
5574
5575// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
5576// If @attribute is of a different type, this operation will fail.
5577//
5578// If @cancellable is not %NULL, then the operation can be cancelled by
5579// triggering the cancellable object from another thread. If the operation
5580// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5581func (x *FileBase) SetAttributeInt64(AttributeVar string, ValueVar int64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5582	var cerr *glib.Error
5583
5584	cret := XGFileSetAttributeInt64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5585	if cerr == nil {
5586		return cret, nil
5587	}
5588	return cret, cerr
5589
5590}
5591
5592// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
5593// If @attribute is of a different type, this operation will fail.
5594//
5595// If @cancellable is not %NULL, then the operation can be cancelled by
5596// triggering the cancellable object from another thread. If the operation
5597// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5598func (x *FileBase) SetAttributeString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5599	var cerr *glib.Error
5600
5601	cret := XGFileSetAttributeString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5602	if cerr == nil {
5603		return cret, nil
5604	}
5605	return cret, cerr
5606
5607}
5608
5609// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
5610// If @attribute is of a different type, this operation will fail.
5611//
5612// If @cancellable is not %NULL, then the operation can be cancelled by
5613// triggering the cancellable object from another thread. If the operation
5614// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5615func (x *FileBase) SetAttributeUint32(AttributeVar string, ValueVar uint32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5616	var cerr *glib.Error
5617
5618	cret := XGFileSetAttributeUint32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5619	if cerr == nil {
5620		return cret, nil
5621	}
5622	return cret, cerr
5623
5624}
5625
5626// Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
5627// If @attribute is of a different type, this operation will fail.
5628//
5629// If @cancellable is not %NULL, then the operation can be cancelled by
5630// triggering the cancellable object from another thread. If the operation
5631// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5632func (x *FileBase) SetAttributeUint64(AttributeVar string, ValueVar uint64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5633	var cerr *glib.Error
5634
5635	cret := XGFileSetAttributeUint64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
5636	if cerr == nil {
5637		return cret, nil
5638	}
5639	return cret, cerr
5640
5641}
5642
5643// Asynchronously sets the attributes of @file with @info.
5644//
5645// For more details, see g_file_set_attributes_from_info(),
5646// which is the synchronous version of this call.
5647//
5648// When the operation is finished, @callback will be called.
5649// You can then call g_file_set_attributes_finish() to get
5650// the result of the operation.
5651func (x *FileBase) SetAttributesAsync(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5652
5653	XGFileSetAttributesAsync(x.GoPointer(), InfoVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5654
5655}
5656
5657// Finishes setting an attribute started in g_file_set_attributes_async().
5658func (x *FileBase) SetAttributesFinish(ResultVar AsyncResult, InfoVar **FileInfo) (bool, error) {
5659	var cerr *glib.Error
5660
5661	cret := XGFileSetAttributesFinish(x.GoPointer(), ResultVar.GoPointer(), InfoVar, &cerr)
5662	if cerr == nil {
5663		return cret, nil
5664	}
5665	return cret, cerr
5666
5667}
5668
5669// Tries to set all attributes in the #GFileInfo on the target
5670// values, not stopping on the first error.
5671//
5672// If there is any error during this operation then @error will
5673// be set to the first error. Error on particular fields are flagged
5674// by setting the "status" field in the attribute value to
5675// %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can
5676// also detect further errors.
5677//
5678// If @cancellable is not %NULL, then the operation can be cancelled by
5679// triggering the cancellable object from another thread. If the operation
5680// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5681func (x *FileBase) SetAttributesFromInfo(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
5682	var cerr *glib.Error
5683
5684	cret := XGFileSetAttributesFromInfo(x.GoPointer(), InfoVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
5685	if cerr == nil {
5686		return cret, nil
5687	}
5688	return cret, cerr
5689
5690}
5691
5692// Renames @file to the specified display name.
5693//
5694// The display name is converted from UTF-8 to the correct encoding
5695// for the target filesystem if possible and the @file is renamed to this.
5696//
5697// If you want to implement a rename operation in the user interface the
5698// edit name (%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
5699// initial value in the rename widget, and then the result after editing
5700// should be passed to g_file_set_display_name().
5701//
5702// On success the resulting converted filename is returned.
5703//
5704// If @cancellable is not %NULL, then the operation can be cancelled by
5705// triggering the cancellable object from another thread. If the operation
5706// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5707func (x *FileBase) SetDisplayName(DisplayNameVar string, CancellableVar *Cancellable) (*FileBase, error) {
5708	var cls *FileBase
5709	var cerr *glib.Error
5710
5711	cret := XGFileSetDisplayName(x.GoPointer(), DisplayNameVar, CancellableVar.GoPointer(), &cerr)
5712
5713	if cret == 0 {
5714		return nil, cerr
5715	}
5716	cls = &FileBase{}
5717	cls.Ptr = cret
5718	if cerr == nil {
5719		return cls, nil
5720	}
5721	return cls, cerr
5722
5723}
5724
5725// Asynchronously sets the display name for a given #GFile.
5726//
5727// For more details, see g_file_set_display_name() which is
5728// the synchronous version of this call.
5729//
5730// When the operation is finished, @callback will be called.
5731// You can then call g_file_set_display_name_finish() to get
5732// the result of the operation.
5733func (x *FileBase) SetDisplayNameAsync(DisplayNameVar string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5734
5735	XGFileSetDisplayNameAsync(x.GoPointer(), DisplayNameVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5736
5737}
5738
5739// Finishes setting a display name started with
5740// g_file_set_display_name_async().
5741func (x *FileBase) SetDisplayNameFinish(ResVar AsyncResult) (*FileBase, error) {
5742	var cls *FileBase
5743	var cerr *glib.Error
5744
5745	cret := XGFileSetDisplayNameFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
5746
5747	if cret == 0 {
5748		return nil, cerr
5749	}
5750	cls = &FileBase{}
5751	cls.Ptr = cret
5752	if cerr == nil {
5753		return cls, nil
5754	}
5755	return cls, cerr
5756
5757}
5758
5759// Starts a file of type %G_FILE_TYPE_MOUNTABLE.
5760// Using @start_operation, you can request callbacks when, for instance,
5761// passwords are needed during authentication.
5762//
5763// If @cancellable is not %NULL, then the operation can be cancelled by
5764// triggering the cancellable object from another thread. If the operation
5765// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5766//
5767// When the operation is finished, @callback will be called.
5768// You can then call g_file_mount_mountable_finish() to get
5769// the result of the operation.
5770func (x *FileBase) StartMountable(FlagsVar DriveStartFlags, StartOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5771
5772	XGFileStartMountable(x.GoPointer(), FlagsVar, StartOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5773
5774}
5775
5776// Finishes a start operation. See g_file_start_mountable() for details.
5777//
5778// Finish an asynchronous start operation that was started
5779// with g_file_start_mountable().
5780func (x *FileBase) StartMountableFinish(ResultVar AsyncResult) (bool, error) {
5781	var cerr *glib.Error
5782
5783	cret := XGFileStartMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5784	if cerr == nil {
5785		return cret, nil
5786	}
5787	return cret, cerr
5788
5789}
5790
5791// Stops a file of type %G_FILE_TYPE_MOUNTABLE.
5792//
5793// If @cancellable is not %NULL, then the operation can be cancelled by
5794// triggering the cancellable object from another thread. If the operation
5795// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5796//
5797// When the operation is finished, @callback will be called.
5798// You can then call g_file_stop_mountable_finish() to get
5799// the result of the operation.
5800func (x *FileBase) StopMountable(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5801
5802	XGFileStopMountable(x.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5803
5804}
5805
5806// Finishes a stop operation, see g_file_stop_mountable() for details.
5807//
5808// Finish an asynchronous stop operation that was started
5809// with g_file_stop_mountable().
5810func (x *FileBase) StopMountableFinish(ResultVar AsyncResult) (bool, error) {
5811	var cerr *glib.Error
5812
5813	cret := XGFileStopMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5814	if cerr == nil {
5815		return cret, nil
5816	}
5817	return cret, cerr
5818
5819}
5820
5821// Checks if @file supports thread-default main contexts
5822// (see [method@GLib.MainContext.push_thread_default])
5823// If this returns %FALSE, you cannot perform asynchronous operations on
5824// @file in a thread that has a thread-default context.
5825func (x *FileBase) SupportsThreadContexts() bool {
5826
5827	cret := XGFileSupportsThreadContexts(x.GoPointer())
5828	return cret
5829}
5830
5831// Sends @file to the "Trashcan", if possible. This is similar to
5832// deleting it, but the user can recover it before emptying the trashcan.
5833// Trashing is disabled for system mounts by default (see
5834// g_unix_mount_entry_is_system_internal()), so this call can return the
5835// %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the `x-gvfs-notrash` unix
5836// mount option can be used to disable g_file_trash() support for particular
5837// mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case.
5838// Since 2.82, the `x-gvfs-trash` unix mount option can be used to enable
5839// g_file_trash() support for particular system mounts.
5840//
5841// If @cancellable is not %NULL, then the operation can be cancelled by
5842// triggering the cancellable object from another thread. If the operation
5843// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5844func (x *FileBase) Trash(CancellableVar *Cancellable) (bool, error) {
5845	var cerr *glib.Error
5846
5847	cret := XGFileTrash(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5848	if cerr == nil {
5849		return cret, nil
5850	}
5851	return cret, cerr
5852
5853}
5854
5855// Asynchronously sends @file to the Trash location, if possible.
5856func (x *FileBase) TrashAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5857
5858	XGFileTrashAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5859
5860}
5861
5862// Finishes an asynchronous file trashing operation, started with
5863// g_file_trash_async().
5864func (x *FileBase) TrashFinish(ResultVar AsyncResult) (bool, error) {
5865	var cerr *glib.Error
5866
5867	cret := XGFileTrashFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5868	if cerr == nil {
5869		return cret, nil
5870	}
5871	return cret, cerr
5872
5873}
5874
5875// Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
5876//
5877// If @cancellable is not %NULL, then the operation can be cancelled by
5878// triggering the cancellable object from another thread. If the operation
5879// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5880//
5881// When the operation is finished, @callback will be called.
5882// You can then call g_file_unmount_mountable_finish() to get
5883// the result of the operation.
5884func (x *FileBase) UnmountMountable(FlagsVar MountUnmountFlags, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5885
5886	XGFileUnmountMountable(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5887
5888}
5889
5890// Finishes an unmount operation, see g_file_unmount_mountable() for details.
5891//
5892// Finish an asynchronous unmount operation that was started
5893// with g_file_unmount_mountable().
5894func (x *FileBase) UnmountMountableFinish(ResultVar AsyncResult) (bool, error) {
5895	var cerr *glib.Error
5896
5897	cret := XGFileUnmountMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5898	if cerr == nil {
5899		return cret, nil
5900	}
5901	return cret, cerr
5902
5903}
5904
5905// Unmounts a file of type %G_FILE_TYPE_MOUNTABLE.
5906//
5907// If @cancellable is not %NULL, then the operation can be cancelled by
5908// triggering the cancellable object from another thread. If the operation
5909// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5910//
5911// When the operation is finished, @callback will be called.
5912// You can then call g_file_unmount_mountable_finish() to get
5913// the result of the operation.
5914func (x *FileBase) UnmountMountableWithOperation(FlagsVar MountUnmountFlags, MountOperationVar *MountOperation, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
5915
5916	XGFileUnmountMountableWithOperation(x.GoPointer(), FlagsVar, MountOperationVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
5917
5918}
5919
5920// Finishes an unmount operation,
5921// see g_file_unmount_mountable_with_operation() for details.
5922//
5923// Finish an asynchronous unmount operation that was started
5924// with g_file_unmount_mountable_with_operation().
5925func (x *FileBase) UnmountMountableWithOperationFinish(ResultVar AsyncResult) (bool, error) {
5926	var cerr *glib.Error
5927
5928	cret := XGFileUnmountMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5929	if cerr == nil {
5930		return cret, nil
5931	}
5932	return cret, cerr
5933
5934}
5935
5936var XGFileAppendTo func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
5937var XGFileAppendToAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
5938var XGFileAppendToFinish func(uintptr, uintptr, **glib.Error) uintptr
5939var XGFileBuildAttributeListForCopy func(uintptr, FileCopyFlags, uintptr, **glib.Error) string
5940var XGFileCopy func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr, **glib.Error) bool
5941var XGFileCopyAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
5942var XGFileCopyAsyncWithClosures func(uintptr, uintptr, FileCopyFlags, int, uintptr, *gobject.Closure, *gobject.Closure)
5943var XGFileCopyAttributes func(uintptr, uintptr, FileCopyFlags, uintptr, **glib.Error) bool
5944var XGFileCopyFinish func(uintptr, uintptr, **glib.Error) bool
5945var XGFileCreate func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
5946var XGFileCreateAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
5947var XGFileCreateFinish func(uintptr, uintptr, **glib.Error) uintptr
5948var XGFileCreateReadwrite func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
5949var XGFileCreateReadwriteAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
5950var XGFileCreateReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
5951var XGFileDelete func(uintptr, uintptr, **glib.Error) bool
5952var XGFileDeleteAsync func(uintptr, int, uintptr, uintptr, uintptr)
5953var XGFileDeleteFinish func(uintptr, uintptr, **glib.Error) bool
5954var XGFileDup func(uintptr) uintptr
5955var XGFileEjectMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
5956var XGFileEjectMountableFinish func(uintptr, uintptr, **glib.Error) bool
5957var XGFileEjectMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
5958var XGFileEjectMountableWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
5959var XGFileEnumerateChildren func(uintptr, string, FileQueryInfoFlags, uintptr, **glib.Error) uintptr
5960var XGFileEnumerateChildrenAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
5961var XGFileEnumerateChildrenFinish func(uintptr, uintptr, **glib.Error) uintptr
5962var XGFileEqual func(uintptr, uintptr) bool
5963var XGFileFindEnclosingMount func(uintptr, uintptr, **glib.Error) uintptr
5964var XGFileFindEnclosingMountAsync func(uintptr, int, uintptr, uintptr, uintptr)
5965var XGFileFindEnclosingMountFinish func(uintptr, uintptr, **glib.Error) uintptr
5966var XGFileGetBasename func(uintptr) string
5967var XGFileGetChild func(uintptr, string) uintptr
5968var XGFileGetChildForDisplayName func(uintptr, string, **glib.Error) uintptr
5969var XGFileGetParent func(uintptr) uintptr
5970var XGFileGetParseName func(uintptr) string
5971var XGFileGetPath func(uintptr) string
5972var XGFileGetRelativePath func(uintptr, uintptr) string
5973var XGFileGetUri func(uintptr) string
5974var XGFileGetUriScheme func(uintptr) string
5975var XGFileHasParent func(uintptr, uintptr) bool
5976var XGFileHasPrefix func(uintptr, uintptr) bool
5977var XGFileHasUriScheme func(uintptr, string) bool
5978var XGFileHash func(uintptr) uint
5979var XGFileIsNative func(uintptr) bool
5980var XGFileLoadBytes func(uintptr, uintptr, *string, **glib.Error) *glib.Bytes
5981var XGFileLoadBytesAsync func(uintptr, uintptr, uintptr, uintptr)
5982var XGFileLoadBytesFinish func(uintptr, uintptr, *string, **glib.Error) *glib.Bytes
5983var XGFileLoadContents func(uintptr, uintptr, *[]string, *uint, *string, **glib.Error) bool
5984var XGFileLoadContentsAsync func(uintptr, uintptr, uintptr, uintptr)
5985var XGFileLoadContentsFinish func(uintptr, uintptr, *[]string, *uint, *string, **glib.Error) bool
5986var XGFileLoadPartialContentsAsync func(uintptr, uintptr, uintptr, uintptr, uintptr)
5987var XGFileLoadPartialContentsFinish func(uintptr, uintptr, *[]string, *uint, *string, **glib.Error) bool
5988var XGFileMakeDirectory func(uintptr, uintptr, **glib.Error) bool
5989var XGFileMakeDirectoryAsync func(uintptr, int, uintptr, uintptr, uintptr)
5990var XGFileMakeDirectoryFinish func(uintptr, uintptr, **glib.Error) bool
5991var XGFileMakeDirectoryWithParents func(uintptr, uintptr, **glib.Error) bool
5992var XGFileMakeSymbolicLink func(uintptr, string, uintptr, **glib.Error) bool
5993var XGFileMakeSymbolicLinkAsync func(uintptr, string, int, uintptr, uintptr, uintptr)
5994var XGFileMakeSymbolicLinkFinish func(uintptr, uintptr, **glib.Error) bool
5995var XGFileMeasureDiskUsage func(uintptr, FileMeasureFlags, uintptr, uintptr, uintptr, *uint64, *uint64, *uint64, **glib.Error) bool
5996var XGFileMeasureDiskUsageAsync func(uintptr, FileMeasureFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
5997var XGFileMeasureDiskUsageFinish func(uintptr, uintptr, *uint64, *uint64, *uint64, **glib.Error) bool
5998var XGFileMonitor func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
5999var XGFileMonitorDirectory func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
6000var XGFileMonitorFile func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
6001var XGFileMountEnclosingVolume func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)
6002var XGFileMountEnclosingVolumeFinish func(uintptr, uintptr, **glib.Error) bool
6003var XGFileMountMountable func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)
6004var XGFileMountMountableFinish func(uintptr, uintptr, **glib.Error) uintptr
6005var XGFileMove func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr, **glib.Error) bool
6006var XGFileMoveAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
6007var XGFileMoveAsyncWithClosures func(uintptr, uintptr, FileCopyFlags, int, uintptr, *gobject.Closure, *gobject.Closure)
6008var XGFileMoveFinish func(uintptr, uintptr, **glib.Error) bool
6009var XGFileOpenReadwrite func(uintptr, uintptr, **glib.Error) uintptr
6010var XGFileOpenReadwriteAsync func(uintptr, int, uintptr, uintptr, uintptr)
6011var XGFileOpenReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
6012var XGFilePeekPath func(uintptr) string
6013var XGFilePollMountable func(uintptr, uintptr, uintptr, uintptr)
6014var XGFilePollMountableFinish func(uintptr, uintptr, **glib.Error) bool
6015var XGFileQueryDefaultHandler func(uintptr, uintptr, **glib.Error) uintptr
6016var XGFileQueryDefaultHandlerAsync func(uintptr, int, uintptr, uintptr, uintptr)
6017var XGFileQueryDefaultHandlerFinish func(uintptr, uintptr, **glib.Error) uintptr
6018var XGFileQueryExists func(uintptr, uintptr) bool
6019var XGFileQueryFileType func(uintptr, FileQueryInfoFlags, uintptr) FileType
6020var XGFileQueryFilesystemInfo func(uintptr, string, uintptr, **glib.Error) uintptr
6021var XGFileQueryFilesystemInfoAsync func(uintptr, string, int, uintptr, uintptr, uintptr)
6022var XGFileQueryFilesystemInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
6023var XGFileQueryInfo func(uintptr, string, FileQueryInfoFlags, uintptr, **glib.Error) uintptr
6024var XGFileQueryInfoAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
6025var XGFileQueryInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
6026var XGFileQuerySettableAttributes func(uintptr, uintptr, **glib.Error) *FileAttributeInfoList
6027var XGFileQueryWritableNamespaces func(uintptr, uintptr, **glib.Error) *FileAttributeInfoList
6028var XGFileRead func(uintptr, uintptr, **glib.Error) uintptr
6029var XGFileReadAsync func(uintptr, int, uintptr, uintptr, uintptr)
6030var XGFileReadFinish func(uintptr, uintptr, **glib.Error) uintptr
6031var XGFileReplace func(uintptr, uintptr, bool, FileCreateFlags, uintptr, **glib.Error) uintptr
6032var XGFileReplaceAsync func(uintptr, uintptr, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)
6033var XGFileReplaceContents func(uintptr, string, uint, uintptr, bool, FileCreateFlags, *string, uintptr, **glib.Error) bool
6034var XGFileReplaceContentsAsync func(uintptr, string, uint, uintptr, bool, FileCreateFlags, uintptr, uintptr, uintptr)
6035var XGFileReplaceContentsBytesAsync func(uintptr, *glib.Bytes, uintptr, bool, FileCreateFlags, uintptr, uintptr, uintptr)
6036var XGFileReplaceContentsFinish func(uintptr, uintptr, *string, **glib.Error) bool
6037var XGFileReplaceFinish func(uintptr, uintptr, **glib.Error) uintptr
6038var XGFileReplaceReadwrite func(uintptr, uintptr, bool, FileCreateFlags, uintptr, **glib.Error) uintptr
6039var XGFileReplaceReadwriteAsync func(uintptr, uintptr, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)
6040var XGFileReplaceReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
6041var XGFileResolveRelativePath func(uintptr, string) uintptr
6042var XGFileSetAttribute func(uintptr, string, FileAttributeType, uintptr, FileQueryInfoFlags, uintptr, **glib.Error) bool
6043var XGFileSetAttributeByteString func(uintptr, string, string, FileQueryInfoFlags, uintptr, **glib.Error) bool
6044var XGFileSetAttributeInt32 func(uintptr, string, int32, FileQueryInfoFlags, uintptr, **glib.Error) bool
6045var XGFileSetAttributeInt64 func(uintptr, string, int64, FileQueryInfoFlags, uintptr, **glib.Error) bool
6046var XGFileSetAttributeString func(uintptr, string, string, FileQueryInfoFlags, uintptr, **glib.Error) bool
6047var XGFileSetAttributeUint32 func(uintptr, string, uint32, FileQueryInfoFlags, uintptr, **glib.Error) bool
6048var XGFileSetAttributeUint64 func(uintptr, string, uint64, FileQueryInfoFlags, uintptr, **glib.Error) bool
6049var XGFileSetAttributesAsync func(uintptr, uintptr, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
6050var XGFileSetAttributesFinish func(uintptr, uintptr, **FileInfo, **glib.Error) bool
6051var XGFileSetAttributesFromInfo func(uintptr, uintptr, FileQueryInfoFlags, uintptr, **glib.Error) bool
6052var XGFileSetDisplayName func(uintptr, string, uintptr, **glib.Error) uintptr
6053var XGFileSetDisplayNameAsync func(uintptr, string, int, uintptr, uintptr, uintptr)
6054var XGFileSetDisplayNameFinish func(uintptr, uintptr, **glib.Error) uintptr
6055var XGFileStartMountable func(uintptr, DriveStartFlags, uintptr, uintptr, uintptr, uintptr)
6056var XGFileStartMountableFinish func(uintptr, uintptr, **glib.Error) bool
6057var XGFileStopMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
6058var XGFileStopMountableFinish func(uintptr, uintptr, **glib.Error) bool
6059var XGFileSupportsThreadContexts func(uintptr) bool
6060var XGFileTrash func(uintptr, uintptr, **glib.Error) bool
6061var XGFileTrashAsync func(uintptr, int, uintptr, uintptr, uintptr)
6062var XGFileTrashFinish func(uintptr, uintptr, **glib.Error) bool
6063var XGFileUnmountMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
6064var XGFileUnmountMountableFinish func(uintptr, uintptr, **glib.Error) bool
6065var XGFileUnmountMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
6066var XGFileUnmountMountableWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
6067
6068var xFileNewBuildFilenamev func([]string) uintptr
6069
6070// Constructs a #GFile from a vector of elements using the correct
6071// separator for filenames.
6072//
6073// Using this function is equivalent to calling g_build_filenamev(),
6074// followed by g_file_new_for_path() on the result.
6075func FileNewBuildFilenamev(ArgsVar []string) *FileBase {
6076	var cls *FileBase
6077
6078	cret := xFileNewBuildFilenamev(ArgsVar)
6079
6080	if cret == 0 {
6081		return nil
6082	}
6083	cls = &FileBase{}
6084	cls.Ptr = cret
6085	return cls
6086}
6087
6088var xFileNewForCommandlineArg func(string) uintptr
6089
6090// Creates a #GFile with the given argument from the command line.
6091// The value of @arg can be either a URI, an absolute path or a
6092// relative path resolved relative to the current working directory.
6093// This operation never fails, but the returned object might not
6094// support any I/O operation if @arg points to a malformed path.
6095//
6096// Note that on Windows, this function expects its argument to be in
6097// UTF-8 -- not the system code page.  This means that you
6098// should not use this function with string from argv as it is passed
6099// to main().  g_win32_get_command_line() will return a UTF-8 version of
6100// the commandline.  #GApplication also uses UTF-8 but
6101// g_application_command_line_create_file_for_arg() may be more useful
6102// for you there.  It is also always possible to use this function with
6103// #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.
6104func FileNewForCommandlineArg(ArgVar string) *FileBase {
6105	var cls *FileBase
6106
6107	cret := xFileNewForCommandlineArg(ArgVar)
6108
6109	if cret == 0 {
6110		return nil
6111	}
6112	cls = &FileBase{}
6113	cls.Ptr = cret
6114	return cls
6115}
6116
6117var xFileNewForCommandlineArgAndCwd func(string, string) uintptr
6118
6119// Creates a #GFile with the given argument from the command line.
6120//
6121// This function is similar to g_file_new_for_commandline_arg() except
6122// that it allows for passing the current working directory as an
6123// argument instead of using the current working directory of the
6124// process.
6125//
6126// This is useful if the commandline argument was given in a context
6127// other than the invocation of the current process.
6128//
6129// See also g_application_command_line_create_file_for_arg().
6130func FileNewForCommandlineArgAndCwd(ArgVar string, CwdVar string) *FileBase {
6131	var cls *FileBase
6132
6133	cret := xFileNewForCommandlineArgAndCwd(ArgVar, CwdVar)
6134
6135	if cret == 0 {
6136		return nil
6137	}
6138	cls = &FileBase{}
6139	cls.Ptr = cret
6140	return cls
6141}
6142
6143var xFileNewForPath func(string) uintptr
6144
6145// Constructs a #GFile for a given path. This operation never
6146// fails, but the returned object might not support any I/O
6147// operation if @path is malformed.
6148func FileNewForPath(PathVar string) *FileBase {
6149	var cls *FileBase
6150
6151	cret := xFileNewForPath(PathVar)
6152
6153	if cret == 0 {
6154		return nil
6155	}
6156	cls = &FileBase{}
6157	cls.Ptr = cret
6158	return cls
6159}
6160
6161var xFileNewForUri func(string) uintptr
6162
6163// Constructs a #GFile for a given URI. This operation never
6164// fails, but the returned object might not support any I/O
6165// operation if @uri is malformed or if the uri type is
6166// not supported.
6167func FileNewForUri(UriVar string) *FileBase {
6168	var cls *FileBase
6169
6170	cret := xFileNewForUri(UriVar)
6171
6172	if cret == 0 {
6173		return nil
6174	}
6175	cls = &FileBase{}
6176	cls.Ptr = cret
6177	return cls
6178}
6179
6180var xFileNewTmp func(uintptr, **FileIOStream, **glib.Error) uintptr
6181
6182// Opens a file in the preferred directory for temporary files (as
6183// returned by g_get_tmp_dir()) and returns a #GFile and
6184// #GFileIOStream pointing to it.
6185//
6186// @tmpl should be a string in the GLib file name encoding
6187// containing a sequence of six 'X' characters, and containing no
6188// directory components. If it is %NULL, a default template is used.
6189//
6190// Unlike the other #GFile constructors, this will return %NULL if
6191// a temporary file could not be created.
6192func FileNewTmp(TmplVar *string, IostreamVar **FileIOStream) (*FileBase, error) {
6193	var cls *FileBase
6194	var cerr *glib.Error
6195
6196	TmplVarPtr := core.GStrdupNullable(TmplVar)
6197	defer core.GFreeNullable(TmplVarPtr)
6198
6199	cret := xFileNewTmp(TmplVarPtr, IostreamVar, &cerr)
6200
6201	if cret == 0 {
6202		return nil, cerr
6203	}
6204	cls = &FileBase{}
6205	cls.Ptr = cret
6206	if cerr == nil {
6207		return cls, nil
6208	}
6209	return cls, cerr
6210
6211}
6212
6213var xFileNewTmpAsync func(uintptr, int, uintptr, uintptr, uintptr)
6214
6215// Asynchronously opens a file in the preferred directory for temporary files
6216//
6217//	(as returned by g_get_tmp_dir()) as g_file_new_tmp().
6218//
6219// @tmpl should be a string in the GLib file name encoding
6220// containing a sequence of six 'X' characters, and containing no
6221// directory components. If it is %NULL, a default template is used.
6222func FileNewTmpAsync(TmplVar *string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
6223
6224	var CallbackVarRef uintptr
6225	if CallbackVar != nil {
6226		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
6227		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
6228			CallbackVarRef = cbRefPtr
6229		} else {
6230			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
6231				cbFn := *CallbackVar
6232				cbFn(arg0, arg1, arg2)
6233			}
6234			CallbackVarRef = purego.NewCallback(fcb)
6235			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
6236		}
6237	}
6238
6239	TmplVarPtr := core.GStrdupNullable(TmplVar)
6240	defer core.GFreeNullable(TmplVarPtr)
6241
6242	xFileNewTmpAsync(TmplVarPtr, IoPriorityVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
6243
6244}
6245
6246var xFileNewTmpDirAsync func(uintptr, int, uintptr, uintptr, uintptr)
6247
6248// Asynchronously creates a directory in the preferred directory for
6249// temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().
6250//
6251// @tmpl should be a string in the GLib file name encoding
6252// containing a sequence of six 'X' characters, and containing no
6253// directory components. If it is %NULL, a default template is used.
6254func FileNewTmpDirAsync(TmplVar *string, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
6255
6256	var CallbackVarRef uintptr
6257	if CallbackVar != nil {
6258		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
6259		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
6260			CallbackVarRef = cbRefPtr
6261		} else {
6262			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
6263				cbFn := *CallbackVar
6264				cbFn(arg0, arg1, arg2)
6265			}
6266			CallbackVarRef = purego.NewCallback(fcb)
6267			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
6268		}
6269	}
6270
6271	TmplVarPtr := core.GStrdupNullable(TmplVar)
6272	defer core.GFreeNullable(TmplVarPtr)
6273
6274	xFileNewTmpDirAsync(TmplVarPtr, IoPriorityVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
6275
6276}
6277
6278var xFileNewTmpDirFinish func(uintptr, **glib.Error) uintptr
6279
6280// Finishes a temporary directory creation started by
6281// g_file_new_tmp_dir_async().
6282func FileNewTmpDirFinish(ResultVar AsyncResult) (*FileBase, error) {
6283	var cls *FileBase
6284	var cerr *glib.Error
6285
6286	cret := xFileNewTmpDirFinish(ResultVar.GoPointer(), &cerr)
6287
6288	if cret == 0 {
6289		return nil, cerr
6290	}
6291	cls = &FileBase{}
6292	cls.Ptr = cret
6293	if cerr == nil {
6294		return cls, nil
6295	}
6296	return cls, cerr
6297
6298}
6299
6300var xFileNewTmpFinish func(uintptr, **FileIOStream, **glib.Error) uintptr
6301
6302// Finishes a temporary file creation started by g_file_new_tmp_async().
6303func FileNewTmpFinish(ResultVar AsyncResult, IostreamVar **FileIOStream) (*FileBase, error) {
6304	var cls *FileBase
6305	var cerr *glib.Error
6306
6307	cret := xFileNewTmpFinish(ResultVar.GoPointer(), IostreamVar, &cerr)
6308
6309	if cret == 0 {
6310		return nil, cerr
6311	}
6312	cls = &FileBase{}
6313	cls.Ptr = cret
6314	if cerr == nil {
6315		return cls, nil
6316	}
6317	return cls, cerr
6318
6319}
6320
6321var xFileParseName func(string) uintptr
6322
6323// Constructs a #GFile with the given @parse_name (i.e. something
6324// given by g_file_get_parse_name()). This operation never fails,
6325// but the returned object might not support any I/O operation if
6326// the @parse_name cannot be parsed.
6327func FileParseName(ParseNameVar string) *FileBase {
6328	var cls *FileBase
6329
6330	cret := xFileParseName(ParseNameVar)
6331
6332	if cret == 0 {
6333		return nil
6334	}
6335	cls = &FileBase{}
6336	cls.Ptr = cret
6337	return cls
6338}
6339
6340func init() {
6341	core.SetPackageName("GIO", "gio-2.0")
6342	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
6343	var libs []uintptr
6344	for _, libPath := range core.GetPaths("GIO") {
6345		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
6346		if err != nil {
6347			panic(err)
6348		}
6349		libs = append(libs, lib)
6350	}
6351
6352	core.PuregoSafeRegister(&xFileNewBuildFilenamev, libs, "g_file_new_build_filenamev")
6353	core.PuregoSafeRegister(&xFileNewForCommandlineArg, libs, "g_file_new_for_commandline_arg")
6354	core.PuregoSafeRegister(&xFileNewForCommandlineArgAndCwd, libs, "g_file_new_for_commandline_arg_and_cwd")
6355	core.PuregoSafeRegister(&xFileNewForPath, libs, "g_file_new_for_path")
6356	core.PuregoSafeRegister(&xFileNewForUri, libs, "g_file_new_for_uri")
6357	core.PuregoSafeRegister(&xFileNewTmp, libs, "g_file_new_tmp")
6358	core.PuregoSafeRegister(&xFileNewTmpAsync, libs, "g_file_new_tmp_async")
6359	core.PuregoSafeRegister(&xFileNewTmpDirAsync, libs, "g_file_new_tmp_dir_async")
6360	core.PuregoSafeRegister(&xFileNewTmpDirFinish, libs, "g_file_new_tmp_dir_finish")
6361	core.PuregoSafeRegister(&xFileNewTmpFinish, libs, "g_file_new_tmp_finish")
6362	core.PuregoSafeRegister(&xFileParseName, libs, "g_file_parse_name")
6363
6364	core.PuregoSafeRegister(&xFileGLibType, libs, "g_file_get_type")
6365
6366	core.PuregoSafeRegister(&XGFileAppendTo, libs, "g_file_append_to")
6367	core.PuregoSafeRegister(&XGFileAppendToAsync, libs, "g_file_append_to_async")
6368	core.PuregoSafeRegister(&XGFileAppendToFinish, libs, "g_file_append_to_finish")
6369	core.PuregoSafeRegister(&XGFileBuildAttributeListForCopy, libs, "g_file_build_attribute_list_for_copy")
6370	core.PuregoSafeRegister(&XGFileCopy, libs, "g_file_copy")
6371	core.PuregoSafeRegister(&XGFileCopyAsync, libs, "g_file_copy_async")
6372	core.PuregoSafeRegister(&XGFileCopyAsyncWithClosures, libs, "g_file_copy_async_with_closures")
6373	core.PuregoSafeRegister(&XGFileCopyAttributes, libs, "g_file_copy_attributes")
6374	core.PuregoSafeRegister(&XGFileCopyFinish, libs, "g_file_copy_finish")
6375	core.PuregoSafeRegister(&XGFileCreate, libs, "g_file_create")
6376	core.PuregoSafeRegister(&XGFileCreateAsync, libs, "g_file_create_async")
6377	core.PuregoSafeRegister(&XGFileCreateFinish, libs, "g_file_create_finish")
6378	core.PuregoSafeRegister(&XGFileCreateReadwrite, libs, "g_file_create_readwrite")
6379	core.PuregoSafeRegister(&XGFileCreateReadwriteAsync, libs, "g_file_create_readwrite_async")
6380	core.PuregoSafeRegister(&XGFileCreateReadwriteFinish, libs, "g_file_create_readwrite_finish")
6381	core.PuregoSafeRegister(&XGFileDelete, libs, "g_file_delete")
6382	core.PuregoSafeRegister(&XGFileDeleteAsync, libs, "g_file_delete_async")
6383	core.PuregoSafeRegister(&XGFileDeleteFinish, libs, "g_file_delete_finish")
6384	core.PuregoSafeRegister(&XGFileDup, libs, "g_file_dup")
6385	core.PuregoSafeRegister(&XGFileEjectMountable, libs, "g_file_eject_mountable")
6386	core.PuregoSafeRegister(&XGFileEjectMountableFinish, libs, "g_file_eject_mountable_finish")
6387	core.PuregoSafeRegister(&XGFileEjectMountableWithOperation, libs, "g_file_eject_mountable_with_operation")
6388	core.PuregoSafeRegister(&XGFileEjectMountableWithOperationFinish, libs, "g_file_eject_mountable_with_operation_finish")
6389	core.PuregoSafeRegister(&XGFileEnumerateChildren, libs, "g_file_enumerate_children")
6390	core.PuregoSafeRegister(&XGFileEnumerateChildrenAsync, libs, "g_file_enumerate_children_async")
6391	core.PuregoSafeRegister(&XGFileEnumerateChildrenFinish, libs, "g_file_enumerate_children_finish")
6392	core.PuregoSafeRegister(&XGFileEqual, libs, "g_file_equal")
6393	core.PuregoSafeRegister(&XGFileFindEnclosingMount, libs, "g_file_find_enclosing_mount")
6394	core.PuregoSafeRegister(&XGFileFindEnclosingMountAsync, libs, "g_file_find_enclosing_mount_async")
6395	core.PuregoSafeRegister(&XGFileFindEnclosingMountFinish, libs, "g_file_find_enclosing_mount_finish")
6396	core.PuregoSafeRegister(&XGFileGetBasename, libs, "g_file_get_basename")
6397	core.PuregoSafeRegister(&XGFileGetChild, libs, "g_file_get_child")
6398	core.PuregoSafeRegister(&XGFileGetChildForDisplayName, libs, "g_file_get_child_for_display_name")
6399	core.PuregoSafeRegister(&XGFileGetParent, libs, "g_file_get_parent")
6400	core.PuregoSafeRegister(&XGFileGetParseName, libs, "g_file_get_parse_name")
6401	core.PuregoSafeRegister(&XGFileGetPath, libs, "g_file_get_path")
6402	core.PuregoSafeRegister(&XGFileGetRelativePath, libs, "g_file_get_relative_path")
6403	core.PuregoSafeRegister(&XGFileGetUri, libs, "g_file_get_uri")
6404	core.PuregoSafeRegister(&XGFileGetUriScheme, libs, "g_file_get_uri_scheme")
6405	core.PuregoSafeRegister(&XGFileHasParent, libs, "g_file_has_parent")
6406	core.PuregoSafeRegister(&XGFileHasPrefix, libs, "g_file_has_prefix")
6407	core.PuregoSafeRegister(&XGFileHasUriScheme, libs, "g_file_has_uri_scheme")
6408	core.PuregoSafeRegister(&XGFileHash, libs, "g_file_hash")
6409	core.PuregoSafeRegister(&XGFileIsNative, libs, "g_file_is_native")
6410	core.PuregoSafeRegister(&XGFileLoadBytes, libs, "g_file_load_bytes")
6411	core.PuregoSafeRegister(&XGFileLoadBytesAsync, libs, "g_file_load_bytes_async")
6412	core.PuregoSafeRegister(&XGFileLoadBytesFinish, libs, "g_file_load_bytes_finish")
6413	core.PuregoSafeRegister(&XGFileLoadContents, libs, "g_file_load_contents")
6414	core.PuregoSafeRegister(&XGFileLoadContentsAsync, libs, "g_file_load_contents_async")
6415	core.PuregoSafeRegister(&XGFileLoadContentsFinish, libs, "g_file_load_contents_finish")
6416	core.PuregoSafeRegister(&XGFileLoadPartialContentsAsync, libs, "g_file_load_partial_contents_async")
6417	core.PuregoSafeRegister(&XGFileLoadPartialContentsFinish, libs, "g_file_load_partial_contents_finish")
6418	core.PuregoSafeRegister(&XGFileMakeDirectory, libs, "g_file_make_directory")
6419	core.PuregoSafeRegister(&XGFileMakeDirectoryAsync, libs, "g_file_make_directory_async")
6420	core.PuregoSafeRegister(&XGFileMakeDirectoryFinish, libs, "g_file_make_directory_finish")
6421	core.PuregoSafeRegister(&XGFileMakeDirectoryWithParents, libs, "g_file_make_directory_with_parents")
6422	core.PuregoSafeRegister(&XGFileMakeSymbolicLink, libs, "g_file_make_symbolic_link")
6423	core.PuregoSafeRegister(&XGFileMakeSymbolicLinkAsync, libs, "g_file_make_symbolic_link_async")
6424	core.PuregoSafeRegister(&XGFileMakeSymbolicLinkFinish, libs, "g_file_make_symbolic_link_finish")
6425	core.PuregoSafeRegister(&XGFileMeasureDiskUsage, libs, "g_file_measure_disk_usage")
6426	core.PuregoSafeRegister(&XGFileMeasureDiskUsageAsync, libs, "g_file_measure_disk_usage_async")
6427	core.PuregoSafeRegister(&XGFileMeasureDiskUsageFinish, libs, "g_file_measure_disk_usage_finish")
6428	core.PuregoSafeRegister(&XGFileMonitor, libs, "g_file_monitor")
6429	core.PuregoSafeRegister(&XGFileMonitorDirectory, libs, "g_file_monitor_directory")
6430	core.PuregoSafeRegister(&XGFileMonitorFile, libs, "g_file_monitor_file")
6431	core.PuregoSafeRegister(&XGFileMountEnclosingVolume, libs, "g_file_mount_enclosing_volume")
6432	core.PuregoSafeRegister(&XGFileMountEnclosingVolumeFinish, libs, "g_file_mount_enclosing_volume_finish")
6433	core.PuregoSafeRegister(&XGFileMountMountable, libs, "g_file_mount_mountable")
6434	core.PuregoSafeRegister(&XGFileMountMountableFinish, libs, "g_file_mount_mountable_finish")
6435	core.PuregoSafeRegister(&XGFileMove, libs, "g_file_move")
6436	core.PuregoSafeRegister(&XGFileMoveAsync, libs, "g_file_move_async")
6437	core.PuregoSafeRegister(&XGFileMoveAsyncWithClosures, libs, "g_file_move_async_with_closures")
6438	core.PuregoSafeRegister(&XGFileMoveFinish, libs, "g_file_move_finish")
6439	core.PuregoSafeRegister(&XGFileOpenReadwrite, libs, "g_file_open_readwrite")
6440	core.PuregoSafeRegister(&XGFileOpenReadwriteAsync, libs, "g_file_open_readwrite_async")
6441	core.PuregoSafeRegister(&XGFileOpenReadwriteFinish, libs, "g_file_open_readwrite_finish")
6442	core.PuregoSafeRegister(&XGFilePeekPath, libs, "g_file_peek_path")
6443	core.PuregoSafeRegister(&XGFilePollMountable, libs, "g_file_poll_mountable")
6444	core.PuregoSafeRegister(&XGFilePollMountableFinish, libs, "g_file_poll_mountable_finish")
6445	core.PuregoSafeRegister(&XGFileQueryDefaultHandler, libs, "g_file_query_default_handler")
6446	core.PuregoSafeRegister(&XGFileQueryDefaultHandlerAsync, libs, "g_file_query_default_handler_async")
6447	core.PuregoSafeRegister(&XGFileQueryDefaultHandlerFinish, libs, "g_file_query_default_handler_finish")
6448	core.PuregoSafeRegister(&XGFileQueryExists, libs, "g_file_query_exists")
6449	core.PuregoSafeRegister(&XGFileQueryFileType, libs, "g_file_query_file_type")
6450	core.PuregoSafeRegister(&XGFileQueryFilesystemInfo, libs, "g_file_query_filesystem_info")
6451	core.PuregoSafeRegister(&XGFileQueryFilesystemInfoAsync, libs, "g_file_query_filesystem_info_async")
6452	core.PuregoSafeRegister(&XGFileQueryFilesystemInfoFinish, libs, "g_file_query_filesystem_info_finish")
6453	core.PuregoSafeRegister(&XGFileQueryInfo, libs, "g_file_query_info")
6454	core.PuregoSafeRegister(&XGFileQueryInfoAsync, libs, "g_file_query_info_async")
6455	core.PuregoSafeRegister(&XGFileQueryInfoFinish, libs, "g_file_query_info_finish")
6456	core.PuregoSafeRegister(&XGFileQuerySettableAttributes, libs, "g_file_query_settable_attributes")
6457	core.PuregoSafeRegister(&XGFileQueryWritableNamespaces, libs, "g_file_query_writable_namespaces")
6458	core.PuregoSafeRegister(&XGFileRead, libs, "g_file_read")
6459	core.PuregoSafeRegister(&XGFileReadAsync, libs, "g_file_read_async")
6460	core.PuregoSafeRegister(&XGFileReadFinish, libs, "g_file_read_finish")
6461	core.PuregoSafeRegister(&XGFileReplace, libs, "g_file_replace")
6462	core.PuregoSafeRegister(&XGFileReplaceAsync, libs, "g_file_replace_async")
6463	core.PuregoSafeRegister(&XGFileReplaceContents, libs, "g_file_replace_contents")
6464	core.PuregoSafeRegister(&XGFileReplaceContentsAsync, libs, "g_file_replace_contents_async")
6465	core.PuregoSafeRegister(&XGFileReplaceContentsBytesAsync, libs, "g_file_replace_contents_bytes_async")
6466	core.PuregoSafeRegister(&XGFileReplaceContentsFinish, libs, "g_file_replace_contents_finish")
6467	core.PuregoSafeRegister(&XGFileReplaceFinish, libs, "g_file_replace_finish")
6468	core.PuregoSafeRegister(&XGFileReplaceReadwrite, libs, "g_file_replace_readwrite")
6469	core.PuregoSafeRegister(&XGFileReplaceReadwriteAsync, libs, "g_file_replace_readwrite_async")
6470	core.PuregoSafeRegister(&XGFileReplaceReadwriteFinish, libs, "g_file_replace_readwrite_finish")
6471	core.PuregoSafeRegister(&XGFileResolveRelativePath, libs, "g_file_resolve_relative_path")
6472	core.PuregoSafeRegister(&XGFileSetAttribute, libs, "g_file_set_attribute")
6473	core.PuregoSafeRegister(&XGFileSetAttributeByteString, libs, "g_file_set_attribute_byte_string")
6474	core.PuregoSafeRegister(&XGFileSetAttributeInt32, libs, "g_file_set_attribute_int32")
6475	core.PuregoSafeRegister(&XGFileSetAttributeInt64, libs, "g_file_set_attribute_int64")
6476	core.PuregoSafeRegister(&XGFileSetAttributeString, libs, "g_file_set_attribute_string")
6477	core.PuregoSafeRegister(&XGFileSetAttributeUint32, libs, "g_file_set_attribute_uint32")
6478	core.PuregoSafeRegister(&XGFileSetAttributeUint64, libs, "g_file_set_attribute_uint64")
6479	core.PuregoSafeRegister(&XGFileSetAttributesAsync, libs, "g_file_set_attributes_async")
6480	core.PuregoSafeRegister(&XGFileSetAttributesFinish, libs, "g_file_set_attributes_finish")
6481	core.PuregoSafeRegister(&XGFileSetAttributesFromInfo, libs, "g_file_set_attributes_from_info")
6482	core.PuregoSafeRegister(&XGFileSetDisplayName, libs, "g_file_set_display_name")
6483	core.PuregoSafeRegister(&XGFileSetDisplayNameAsync, libs, "g_file_set_display_name_async")
6484	core.PuregoSafeRegister(&XGFileSetDisplayNameFinish, libs, "g_file_set_display_name_finish")
6485	core.PuregoSafeRegister(&XGFileStartMountable, libs, "g_file_start_mountable")
6486	core.PuregoSafeRegister(&XGFileStartMountableFinish, libs, "g_file_start_mountable_finish")
6487	core.PuregoSafeRegister(&XGFileStopMountable, libs, "g_file_stop_mountable")
6488	core.PuregoSafeRegister(&XGFileStopMountableFinish, libs, "g_file_stop_mountable_finish")
6489	core.PuregoSafeRegister(&XGFileSupportsThreadContexts, libs, "g_file_supports_thread_contexts")
6490	core.PuregoSafeRegister(&XGFileTrash, libs, "g_file_trash")
6491	core.PuregoSafeRegister(&XGFileTrashAsync, libs, "g_file_trash_async")
6492	core.PuregoSafeRegister(&XGFileTrashFinish, libs, "g_file_trash_finish")
6493	core.PuregoSafeRegister(&XGFileUnmountMountable, libs, "g_file_unmount_mountable")
6494	core.PuregoSafeRegister(&XGFileUnmountMountableFinish, libs, "g_file_unmount_mountable_finish")
6495	core.PuregoSafeRegister(&XGFileUnmountMountableWithOperation, libs, "g_file_unmount_mountable_with_operation")
6496	core.PuregoSafeRegister(&XGFileUnmountMountableWithOperationFinish, libs, "g_file_unmount_mountable_with_operation_finish")
6497
6498}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close