2024-08-25 04:08:24 +00:00
|
|
|
#include <QDateTime>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QFile>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qfileinfo.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qfileinfo.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QFileInfo* QFileInfo_new() {
|
|
|
|
return new QFileInfo();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QFileInfo* QFileInfo_new2(struct miqt_string file) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString file_QString = QString::fromUtf8(file.data, file.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QFileInfo(file_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QFileInfo* QFileInfo_new3(QFile* file) {
|
|
|
|
return new QFileInfo(*file);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString file_QString = QString::fromUtf8(file.data, file.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QFileInfo(*dir, file_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QFileInfo* QFileInfo_new5(QFileInfo* fileinfo) {
|
|
|
|
return new QFileInfo(*fileinfo);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo) {
|
|
|
|
self->operator=(*fileinfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFileInfo_Swap(QFileInfo* self, QFileInfo* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_OperatorEqual(const QFileInfo* self, QFileInfo* fileinfo) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self == *fileinfo);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_OperatorNotEqual(const QFileInfo* self, QFileInfo* fileinfo) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self != *fileinfo);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QFileInfo_SetFile(QFileInfo* self, struct miqt_string file) {
|
|
|
|
QString file_QString = QString::fromUtf8(file.data, file.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setFile(file_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFileInfo_SetFileWithFile(QFileInfo* self, QFile* file) {
|
|
|
|
self->setFile(*file);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QFileInfo_SetFile2(QFileInfo* self, QDir* dir, struct miqt_string file) {
|
|
|
|
QString file_QString = QString::fromUtf8(file.data, file.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setFile(*dir, file_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_Exists(const QFileInfo* self) {
|
|
|
|
return self->exists();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QFileInfo_ExistsWithFile(struct miqt_string file) {
|
|
|
|
QString file_QString = QString::fromUtf8(file.data, file.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return QFileInfo::exists(file_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFileInfo_Refresh(QFileInfo* self) {
|
|
|
|
self->refresh();
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_FilePath(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->filePath();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_AbsoluteFilePath(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->absoluteFilePath();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_CanonicalFilePath(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->canonicalFilePath();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_FileName(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->fileName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_BaseName(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->baseName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_CompleteBaseName(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->completeBaseName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_Suffix(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->suffix();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_BundleName(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->bundleName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_CompleteSuffix(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->completeSuffix();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_Path(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->path();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_AbsolutePath(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->absolutePath();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_CanonicalPath(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->canonicalPath();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDir* QFileInfo_Dir(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDir(self->dir());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDir* QFileInfo_AbsoluteDir(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDir(self->absoluteDir());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsReadable(const QFileInfo* self) {
|
|
|
|
return self->isReadable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsWritable(const QFileInfo* self) {
|
|
|
|
return self->isWritable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsExecutable(const QFileInfo* self) {
|
|
|
|
return self->isExecutable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsHidden(const QFileInfo* self) {
|
|
|
|
return self->isHidden();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsNativePath(const QFileInfo* self) {
|
|
|
|
return self->isNativePath();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsRelative(const QFileInfo* self) {
|
|
|
|
return self->isRelative();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsAbsolute(const QFileInfo* self) {
|
|
|
|
return self->isAbsolute();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFileInfo_MakeAbsolute(QFileInfo* self) {
|
|
|
|
return self->makeAbsolute();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsFile(const QFileInfo* self) {
|
|
|
|
return self->isFile();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsDir(const QFileInfo* self) {
|
|
|
|
return self->isDir();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsSymLink(const QFileInfo* self) {
|
|
|
|
return self->isSymLink();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsSymbolicLink(const QFileInfo* self) {
|
|
|
|
return self->isSymbolicLink();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsShortcut(const QFileInfo* self) {
|
|
|
|
return self->isShortcut();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsJunction(const QFileInfo* self) {
|
|
|
|
return self->isJunction();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsRoot(const QFileInfo* self) {
|
|
|
|
return self->isRoot();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_IsBundle(const QFileInfo* self) {
|
|
|
|
return self->isBundle();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_ReadLink(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->readLink();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_SymLinkTarget(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->symLinkTarget();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_Owner(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->owner();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
unsigned int QFileInfo_OwnerId(const QFileInfo* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
uint _ret = self->ownerId();
|
|
|
|
return static_cast<unsigned int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFileInfo_Group(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->group();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
unsigned int QFileInfo_GroupId(const QFileInfo* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
uint _ret = self->groupId();
|
|
|
|
return static_cast<unsigned int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_Permission(const QFileInfo* self, int permissions) {
|
|
|
|
return self->permission(static_cast<QFile::Permissions>(permissions));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFileInfo_Permissions(const QFileInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QFile::Permissions _ret = self->permissions();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QFileInfo_Size(const QFileInfo* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->size();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QFileInfo_Created(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->created());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QFileInfo_BirthTime(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->birthTime());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QFileInfo_MetadataChangeTime(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->metadataChangeTime());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QFileInfo_LastModified(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->lastModified());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QFileInfo_LastRead(const QFileInfo* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->lastRead());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QDateTime* QFileInfo_FileTime(const QFileInfo* self, int time) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QDateTime(self->fileTime(static_cast<QFile::FileTime>(time)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFileInfo_Caching(const QFileInfo* self) {
|
|
|
|
return self->caching();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QFileInfo_SetCaching(QFileInfo* self, bool on) {
|
|
|
|
self->setCaching(on);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QFileInfo_Delete(QFileInfo* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QFileInfo*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|