File indexing completed on 2025-01-05 04:26:48

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "CoreFileInfo.h"
0020 
0021 #include <QDateTime>
0022 #include <QDir>
0023 
0024 using namespace QtBindings::Core;
0025 
0026 FileInfo::FileInfo()
0027 {
0028 }
0029 
0030 FileInfo::FileInfo(const QString &file) : QFileInfo(file)
0031 {
0032 }
0033 
0034 FileInfo::FileInfo(const QFile &file) : QFileInfo(file)
0035 {
0036 }
0037 
0038 FileInfo::FileInfo(const QDir &dir, const QString &file) : QFileInfo(dir, file)
0039 {
0040 }
0041 
0042 FileInfo::FileInfo(const QFileInfo &fileinfo) : QFileInfo(fileinfo)
0043 {
0044 }
0045 
0046 FileInfo::FileInfo(const FileInfo &fileinfo) : QObject(), QFileInfo(fileinfo)
0047 {
0048 }
0049 
0050 FileInfo::FileInfo(QFileInfoPrivate *d) : QFileInfo(d)
0051 {
0052 }
0053 
0054 QDir FileInfo::absoluteDir() const
0055 {
0056     return QFileInfo::absoluteDir();
0057 }
0058 
0059 QString FileInfo::absoluteFilePath() const
0060 {
0061     return QFileInfo::absoluteFilePath();
0062 }
0063 
0064 QString FileInfo::absolutePath() const
0065 {
0066     return QFileInfo::absolutePath();
0067 }
0068 
0069 QString FileInfo::baseName() const
0070 {
0071     return QFileInfo::baseName();
0072 }
0073 
0074 QString FileInfo::bundleName() const
0075 {
0076     return QFileInfo::bundleName();
0077 }
0078 
0079 bool FileInfo::caching() const
0080 {
0081     return QFileInfo::caching();
0082 }
0083 
0084 QString FileInfo::canonicalFilePath() const
0085 {
0086     return QFileInfo::canonicalFilePath();
0087 }
0088 
0089 QString FileInfo::canonicalPath() const
0090 {
0091     return QFileInfo::canonicalPath();
0092 }
0093 
0094 QString FileInfo::completeBaseName() const
0095 {
0096     return QFileInfo::completeBaseName();
0097 }
0098 
0099 QString FileInfo::completeSuffix() const
0100 {
0101     return QFileInfo::completeSuffix();
0102 }
0103 
0104 QDateTime FileInfo::birthTime() const
0105 {
0106     return QFileInfo::birthTime();
0107 }
0108 
0109 QDateTime FileInfo::metadataChangeTime() const
0110 {
0111     return QFileInfo::metadataChangeTime();
0112 }
0113 
0114 QDir FileInfo::dir() const
0115 {
0116     return QFileInfo::dir();
0117 }
0118 
0119 bool FileInfo::exists() const
0120 {
0121     return QFileInfo::exists();
0122 }
0123 
0124 QString FileInfo::fileName() const
0125 {
0126     return QFileInfo::fileName();
0127 }
0128 
0129 QString FileInfo::filePath() const
0130 {
0131     return QFileInfo::filePath();
0132 }
0133 
0134 QString FileInfo::group() const
0135 {
0136     return QFileInfo::group();
0137 }
0138 
0139 uint FileInfo::groupId() const
0140 {
0141     return QFileInfo::groupId();
0142 }
0143 
0144 bool FileInfo::isAbsolute() const
0145 {
0146     return QFileInfo::isAbsolute();
0147 }
0148 
0149 bool FileInfo::isBundle() const
0150 {
0151     return QFileInfo::isBundle();
0152 }
0153 
0154 bool FileInfo::isDir() const
0155 {
0156     return QFileInfo::isDir();
0157 }
0158 
0159 bool FileInfo::isExecutable() const
0160 {
0161     return QFileInfo::isExecutable();
0162 }
0163 
0164 bool FileInfo::isFile() const
0165 {
0166     return QFileInfo::isFile();
0167 }
0168 
0169 bool FileInfo::isHidden() const
0170 {
0171     return QFileInfo::isHidden();
0172 }
0173 
0174 bool FileInfo::isNativePath() const
0175 {
0176     return QFileInfo::isNativePath();
0177 }
0178 
0179 bool FileInfo::isReadable() const
0180 {
0181     return QFileInfo::isReadable();
0182 }
0183 
0184 bool FileInfo::isRelative() const
0185 {
0186     return QFileInfo::isRelative();
0187 }
0188 
0189 bool FileInfo::isRoot() const
0190 {
0191     return QFileInfo::isRoot();
0192 }
0193 
0194 bool FileInfo::isSymLink() const
0195 {
0196     return QFileInfo::isSymLink();
0197 }
0198 
0199 bool FileInfo::isWritable() const
0200 {
0201     return QFileInfo::isWritable();
0202 }
0203 
0204 QDateTime FileInfo::lastModified() const
0205 {
0206     return QFileInfo::lastModified();
0207 }
0208 
0209 QDateTime FileInfo::lastRead() const
0210 {
0211     return QFileInfo::lastRead();
0212 }
0213 
0214 bool FileInfo::makeAbsolute()
0215 {
0216     return QFileInfo::makeAbsolute();
0217 }
0218 
0219 QString FileInfo::owner() const
0220 {
0221     return QFileInfo::owner();
0222 }
0223 
0224 uint FileInfo::ownerId() const
0225 {
0226     return QFileInfo::ownerId();
0227 }
0228 
0229 QString FileInfo::path() const
0230 {
0231     return QFileInfo::path();
0232 }
0233 
0234 bool FileInfo::permission(QFile::Permissions permissions) const
0235 {
0236     return QFileInfo::permission(permissions);
0237 }
0238 
0239 QFile::Permissions FileInfo::permissions() const
0240 {
0241     return QFileInfo::permissions();
0242 }
0243 
0244 void FileInfo::refresh()
0245 {
0246     QFileInfo::refresh();
0247 }
0248 
0249 void FileInfo::setCaching(bool on)
0250 {
0251     QFileInfo::setCaching(on);
0252 }
0253 
0254 void FileInfo::setFile(const QDir &dir, const QString &file)
0255 {
0256     QFileInfo::setFile(dir, file);
0257 }
0258 
0259 void FileInfo::setFile(const QFile &file)
0260 {
0261     QFileInfo::setFile(file);
0262 }
0263 
0264 void FileInfo::setFile(const QString &file)
0265 {
0266     QFileInfo::setFile(file);
0267 }
0268 
0269 qint64 FileInfo::size() const
0270 {
0271     return QFileInfo::size();
0272 }
0273 
0274 QString FileInfo::suffix() const
0275 {
0276     return QFileInfo::suffix();
0277 }
0278 
0279 void FileInfo::swap(QFileInfo &other)
0280 {
0281     QFileInfo::swap(other);
0282 }
0283 
0284 QString FileInfo::symLinkTarget() const
0285 {
0286     return QFileInfo::symLinkTarget();
0287 }
0288 
0289 bool FileInfo::exists(const QString &file)
0290 {
0291     return QFileInfo::exists(file);
0292 }
0293 
0294 FileInfo &FileInfo::operator=(const FileInfo &other)
0295 {
0296     if (this != &other)
0297         QFileInfo::operator=(other);
0298     return *this;
0299 }