2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qfileinfo.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QFileInfo struct {
|
|
|
|
h *C.QFileInfo
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) cPointer() *C.QFileInfo {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFileInfo(h *C.QFileInfo) *QFileInfo {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QFileInfo{h: h}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFileInfo_U(h unsafe.Pointer) *QFileInfo {
|
|
|
|
return newQFileInfo((*C.QFileInfo)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFileInfo constructs a new QFileInfo object.
|
|
|
|
func NewQFileInfo() *QFileInfo {
|
|
|
|
ret := C.QFileInfo_new()
|
|
|
|
return newQFileInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFileInfo2 constructs a new QFileInfo object.
|
|
|
|
func NewQFileInfo2(file string) *QFileInfo {
|
2024-09-14 22:29:05 +00:00
|
|
|
file_ms := miqt_strdupg(file)
|
|
|
|
defer C.free(file_ms)
|
|
|
|
ret := C.QFileInfo_new2((*C.struct_miqt_string)(file_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQFileInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFileInfo3 constructs a new QFileInfo object.
|
|
|
|
func NewQFileInfo3(file *QFile) *QFileInfo {
|
|
|
|
ret := C.QFileInfo_new3(file.cPointer())
|
|
|
|
return newQFileInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFileInfo4 constructs a new QFileInfo object.
|
|
|
|
func NewQFileInfo4(dir *QDir, file string) *QFileInfo {
|
2024-09-14 22:29:05 +00:00
|
|
|
file_ms := miqt_strdupg(file)
|
|
|
|
defer C.free(file_ms)
|
|
|
|
ret := C.QFileInfo_new4(dir.cPointer(), (*C.struct_miqt_string)(file_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQFileInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFileInfo5 constructs a new QFileInfo object.
|
|
|
|
func NewQFileInfo5(fileinfo *QFileInfo) *QFileInfo {
|
|
|
|
ret := C.QFileInfo_new5(fileinfo.cPointer())
|
|
|
|
return newQFileInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) OperatorAssign(fileinfo *QFileInfo) {
|
|
|
|
C.QFileInfo_OperatorAssign(this.h, fileinfo.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Swap(other *QFileInfo) {
|
|
|
|
C.QFileInfo_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) OperatorEqual(fileinfo *QFileInfo) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_OperatorEqual(this.h, fileinfo.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) OperatorNotEqual(fileinfo *QFileInfo) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_OperatorNotEqual(this.h, fileinfo.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) SetFile(file string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
file_ms := miqt_strdupg(file)
|
|
|
|
defer C.free(file_ms)
|
|
|
|
C.QFileInfo_SetFile(this.h, (*C.struct_miqt_string)(file_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) SetFileWithFile(file *QFile) {
|
|
|
|
C.QFileInfo_SetFileWithFile(this.h, file.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) SetFile2(dir *QDir, file string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
file_ms := miqt_strdupg(file)
|
|
|
|
defer C.free(file_ms)
|
|
|
|
C.QFileInfo_SetFile2(this.h, dir.cPointer(), (*C.struct_miqt_string)(file_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Exists() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_Exists(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QFileInfo_ExistsWithFile(file string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
file_ms := miqt_strdupg(file)
|
|
|
|
defer C.free(file_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_ExistsWithFile((*C.struct_miqt_string)(file_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Refresh() {
|
|
|
|
C.QFileInfo_Refresh(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) FilePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_FilePath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) AbsoluteFilePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_AbsoluteFilePath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) CanonicalFilePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_CanonicalFilePath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) FileName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_FileName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) BaseName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_BaseName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) CompleteBaseName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_CompleteBaseName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Suffix() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_Suffix(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) BundleName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_BundleName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) CompleteSuffix() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_CompleteSuffix(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Path() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_Path(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) AbsolutePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_AbsolutePath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) CanonicalPath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_CanonicalPath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Dir() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_Dir(this.h)
|
|
|
|
_goptr := newQDir(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) AbsoluteDir() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_AbsoluteDir(this.h)
|
|
|
|
_goptr := newQDir(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsReadable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsReadable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsWritable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsWritable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsExecutable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsExecutable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsHidden() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsHidden(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsNativePath() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsNativePath(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsRelative() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsRelative(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsAbsolute() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsAbsolute(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) MakeAbsolute() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_MakeAbsolute(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsFile() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsFile(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsDir() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsDir(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsSymLink() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsSymLink(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsSymbolicLink() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsSymbolicLink(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsShortcut() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsShortcut(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsJunction() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsJunction(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsRoot() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsRoot(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) IsBundle() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_IsBundle(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) ReadLink() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_ReadLink(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) SymLinkTarget() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_SymLinkTarget(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Owner() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_Owner(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) OwnerId() uint {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (uint)(C.QFileInfo_OwnerId(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Group() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFileInfo_Group(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) GroupId() uint {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (uint)(C.QFileInfo_GroupId(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QFileInfo) Permission(permissions int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_Permission(this.h, (C.int)(permissions)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Permissions() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFileInfo_Permissions(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFileInfo) Size() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QFileInfo_Size(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) Created() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_Created(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) BirthTime() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_BirthTime(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) MetadataChangeTime() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_MetadataChangeTime(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) LastModified() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_LastModified(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) LastRead() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_LastRead(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QFileInfo) FileTime(time uintptr) *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFileInfo_FileTime(this.h, (C.uintptr_t)(time))
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFileInfo) Caching() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFileInfo_Caching(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFileInfo) SetCaching(on bool) {
|
|
|
|
C.QFileInfo_SetCaching(this.h, (C.bool)(on))
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFileInfo) Delete() {
|
|
|
|
C.QFileInfo_Delete(this.h)
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QFileInfo) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QFileInfo) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|