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

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedro.gomes@ipsoft.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 "CoreDir.h"
0020 
0021 using namespace QtBindings::Core;
0022 
0023 Dir::Dir(const QDir &path) : QDir(path)
0024 {
0025 }
0026 
0027 Dir::Dir(const Dir &path) : QObject(), QDir(path)
0028 {
0029 }
0030 
0031 Dir::Dir(const QString &path) : QDir(path)
0032 {
0033 }
0034 
0035 Dir::Dir(const QString &path, const QString &nameFilter,
0036         QDir::SortFlags sort, QDir::Filters filter) : QDir(path, nameFilter, sort, filter)
0037 {
0038 }
0039 
0040 bool Dir::cd(const QString &dirName)
0041 {
0042     return QDir::cd(dirName);
0043 }
0044 
0045 bool Dir::cdUp()
0046 {
0047     return QDir::cdUp();
0048 }
0049 
0050 bool Dir::exists() const
0051 {
0052     return QDir::exists();
0053 }
0054 
0055 bool Dir::exists(const QString &name) const
0056 {
0057     return QDir::exists(name);
0058 }
0059 
0060 bool Dir::isEmpty(QDir::Filters filters) const
0061 {
0062     return QDir::isEmpty(filters);
0063 }
0064 
0065 bool Dir::isReadable() const
0066 {
0067     return QDir::isReadable();
0068 }
0069 
0070 bool Dir::isRelative() const
0071 {
0072     return QDir::isRelative();
0073 }
0074 
0075 bool Dir::isRoot() const
0076 {
0077     return QDir::isRoot();
0078 }
0079 
0080 bool Dir::makeAbsolute()
0081 {
0082     return QDir::makeAbsolute();
0083 }
0084 
0085 bool Dir::mkdir(const QString &dirName) const
0086 {
0087     return QDir::mkdir(dirName);
0088 }
0089 
0090 bool Dir::mkpath(const QString &dirPath) const
0091 {
0092     return QDir::mkpath(dirPath);
0093 }
0094 
0095 bool Dir::remove(const QString &fileName)
0096 {
0097     return QDir::remove(fileName);
0098 }
0099 
0100 bool Dir::removeRecursively()
0101 {
0102     return QDir::removeRecursively();
0103 }
0104 
0105 bool Dir::rename(const QString &oldName, const QString &newName)
0106 {
0107     return QDir::rename(oldName, newName);
0108 }
0109 
0110 bool Dir::rmdir(const QString &dirName) const
0111 {
0112     return QDir::rmdir(dirName);
0113 }
0114 
0115 bool Dir::rmpath(const QString &dirPath) const
0116 {
0117     return QDir::rmpath(dirPath);
0118 }
0119 
0120 QDir::Filters Dir::filter() const
0121 {
0122     return QDir::filter();
0123 }
0124 
0125 QFileInfoList Dir::entryInfoList(const QStringList &nameFilters, QDir::Filters filters, QDir::SortFlags sort) const
0126 {
0127     return QDir::entryInfoList(nameFilters, filters, sort);
0128 }
0129 
0130 QFileInfoList Dir::entryInfoList(QDir::Filters filters, QDir::SortFlags sort) const
0131 {
0132     return QDir::entryInfoList(filters, sort);
0133 }
0134 
0135 QString Dir::absoluteFilePath(const QString &fileName) const
0136 {
0137     return QDir::absoluteFilePath(fileName);
0138 }
0139 
0140 QString Dir::absolutePath() const
0141 {
0142     return QDir::absolutePath();
0143 }
0144 
0145 QString Dir::canonicalPath() const
0146 {
0147     return QDir::canonicalPath();
0148 }
0149 
0150 QString Dir::dirName() const
0151 {
0152     return QDir::dirName();
0153 }
0154 
0155 QString Dir::filePath(const QString &fileName) const
0156 {
0157     return QDir::filePath(fileName);
0158 }
0159 
0160 QStringList Dir::entryList(const QStringList &nameFilters, QDir::Filters filters, QDir::SortFlags sort) const
0161 {
0162     return QDir::entryList(nameFilters, filters, sort);
0163 }
0164 
0165 QStringList Dir::entryList(QDir::Filters filters, QDir::SortFlags sort) const
0166 {
0167     return QDir::entryList(filters, sort);
0168 }
0169 
0170 QStringList Dir::nameFilters() const
0171 {
0172     return QDir::nameFilters();
0173 }
0174 
0175 QString Dir::path() const
0176 {
0177     return QDir::path();
0178 }
0179 
0180 QString Dir::relativeFilePath(const QString &fileName) const
0181 {
0182     return QDir::relativeFilePath(fileName);
0183 }
0184 
0185 QDir::SortFlags Dir::sorting() const
0186 {
0187     return QDir::sorting();
0188 }
0189 
0190 uint Dir::count() const
0191 {
0192     return QDir::count();
0193 }
0194 
0195 void Dir::refresh() const
0196 {
0197     QDir::refresh();
0198 }
0199 
0200 void Dir::setFilter(QDir::Filters filter)
0201 {
0202     QDir::setFilter(filter);
0203 }
0204 
0205 void Dir::setNameFilters(const QStringList &nameFilters)
0206 {
0207     QDir::setNameFilters(nameFilters);
0208 }
0209 
0210 void Dir::setPath(const QString &path)
0211 {
0212     QDir::setPath(path);
0213 }
0214 
0215 void Dir::setSorting(QDir::SortFlags sort)
0216 {
0217     QDir::setSorting(sort);
0218 }
0219 
0220 void Dir::swap(QDir &other)
0221 {
0222     QDir::swap(other);
0223 }
0224 
0225 bool Dir::isAbsolutePath(const QString &path)
0226 {
0227     return QDir::isAbsolutePath(path);
0228 }
0229 
0230 bool Dir::isRelativePath(const QString &path)
0231 {
0232     return QDir::isRelativePath(path);
0233 }
0234 
0235 bool Dir::match(const QString &filter, const QString &fileName)
0236 {
0237     return QDir::match(filter,fileName);
0238 }
0239 
0240 bool Dir::match(const QStringList &filters, const QString &fileName)
0241 {
0242     return QDir::match(filters,fileName);
0243 }
0244 
0245 bool Dir::setCurrent(const QString &path)
0246 {
0247     return QDir::setCurrent(path);
0248 }
0249 
0250 QChar Dir::listSeparator()
0251 {
0252     return QDir::listSeparator();
0253 }
0254 
0255 QChar Dir::separator()
0256 {
0257     return QDir::separator();
0258 }
0259 
0260 QDir Dir::current()
0261 {
0262     return QDir::current();
0263 }
0264 
0265 QDir Dir::home()
0266 {
0267     return QDir::home();
0268 }
0269 
0270 QDir Dir::root()
0271 {
0272     return QDir::root();
0273 }
0274 
0275 QDir Dir::temp()
0276 {
0277     return QDir::temp();
0278 }
0279 
0280 QFileInfoList Dir::drives()
0281 {
0282     return QDir::drives();
0283 }
0284 
0285 QString Dir::cleanPath(const QString &path)
0286 {
0287     return QDir::cleanPath(path);
0288 }
0289 
0290 QString Dir::currentPath()
0291 {
0292     return QDir::currentPath();
0293 }
0294 
0295 QString Dir::fromNativeSeparators(const QString &pathName)
0296 {
0297     return QDir::fromNativeSeparators(pathName);
0298 }
0299 
0300 QString Dir::homePath()
0301 {
0302     return QDir::homePath();
0303 }
0304 
0305 QStringList Dir::nameFiltersFromString(const QString &nameFilter)
0306 {
0307     return QDir::nameFiltersFromString(nameFilter);
0308 }
0309 
0310 QStringList Dir::searchPaths(const QString &prefix)
0311 {
0312     return QDir::searchPaths(prefix);
0313 }
0314 
0315 QString Dir::rootPath()
0316 {
0317     return QDir::rootPath();
0318 }
0319 
0320 QString Dir::tempPath()
0321 {
0322     return QDir::tempPath();
0323 }
0324 
0325 QString Dir::toNativeSeparators(const QString &pathName)
0326 {
0327     return QDir::toNativeSeparators(pathName);
0328 }
0329 
0330 void Dir::addSearchPath(const QString &prefix, const QString &path)
0331 {
0332     QDir::addSearchPath(prefix,path);
0333 }
0334 
0335 void Dir::setSearchPaths(const QString &prefix, const QStringList &searchPaths)
0336 {
0337     QDir::setSearchPaths(prefix,searchPaths);
0338 }
0339 
0340 Dir &Dir::operator=(const Dir &other)
0341 {
0342     if (this != &other) {
0343        QDir::operator=( other );
0344     }
0345     return *this;
0346 }