| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/miscellaneous/iofactory.h`/ |
| 2 | |
| 3 | #ifndef IOFACTORY_H |
| 4 | #define IOFACTORY_Hcxx . . $ `src/librssguard/miscellaneous/iofactory.h:4:9`! |
| 5 | |
| 6 | #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/ |
| 7 | |
| 8 | #include <QCoreApplication> |
| 9 | #include <QProcessEnvironment> |
| 10 | #include <QStandardPaths> |
| 11 | |
| 12 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! IOFactorycxx . . $ IOFactory# { |
| 13 | Q_DECLARE_TR_FUNCTIONScxx . . $ IOFactory#tr(75d9f1c324b4579d).(IOFactory) |
| 14 | |
| 15 | private: |
| 16 | IOFactorycxx . . $ IOFactory#IOFactory(49f6e7a06ebc5aa8).(); |
| 17 | |
| 18 | public: |
| 19 | static bool isFolderWritablecxx . . $ IOFactory#isFolderWritable(e1defb592416720d).(const QStringcxx . . $ QString#& folder); |
| 20 | |
| 21 | // Returns system-wide folder according to type. |
| 22 | static QStringcxx . . $ QString# getSystemFoldercxx . . $ IOFactory#getSystemFolder(7d8b34fbb6a9c1bf).(QStandardPathscxx . . $ QStandardPaths#::StandardLocationcxx . . $ QStandardPaths#StandardLocation# location); |
| 23 | |
| 24 | // Checks given file if it exists and if it does, then generates non-existing new file |
| 25 | // according to format. |
| 26 | static QStringcxx . . $ QString# ensureUniqueFilenamecxx . . $ IOFactory#ensureUniqueFilename(e9cecc7c907e7d19).(const QStringcxx . . $ QString#& name, const QStringcxx . . $ QString#& append_format = QSLcxx . . $ QtPrivate/("(%1)")); |
| 27 | |
| 28 | // Filters out shit characters from filename. |
| 29 | static QStringcxx . . $ QString# filterBadCharsFromFilenamecxx . . $ IOFactory#filterBadCharsFromFilename(fd988a2ab94d906b).(const QStringcxx . . $ QString#& name); |
| 30 | static bool startProcessDetachedcxx . . $ IOFactory#startProcessDetached(dc92d07c7f5866a0).(const QStringcxx . . $ QString#& executable, |
| 31 | const QStringListcxx . . $ QStringList#& arguments =cxx . . $ QList#QList(ced63f7c635d850d). {}, |
| 32 | const QStringcxx . . $ QString#& working_directory =cxx . . $ QString#QString(ced63f7c635d850d). {}); |
| 33 | static void startProcesscxx . . $ IOFactory#startProcess(d450598c3919f783).(QProcesscxx . . $ QProcess#* const proc, |
| 34 | const QStringcxx . . $ QString#& executable, |
| 35 | const QStringListcxx . . $ QStringList#& arguments =cxx . . $ QList#QList(ced63f7c635d850d). {}, |
| 36 | const QProcessEnvironmentcxx . . $ QProcessEnvironment#& pe =cxx . . $ QProcessEnvironment#QProcessEnvironment(49f6e7a06ebc5aa8). {}, |
| 37 | const QStringcxx . . $ QString#& working_directory =cxx . . $ QString#QString(ced63f7c635d850d). {}); |
| 38 | static QStringcxx . . $ QString# startProcessGetOutputcxx . . $ IOFactory#startProcessGetOutput(ea321589343e1f82).(const QStringcxx . . $ QString#& executable, |
| 39 | const QStringListcxx . . $ QStringList#& arguments =cxx . . $ QList#QList(ced63f7c635d850d). {}, |
| 40 | const QProcessEnvironmentcxx . . $ QProcessEnvironment#& pe =cxx . . $ QProcessEnvironment#QProcessEnvironment(49f6e7a06ebc5aa8). {}, |
| 41 | const QStringcxx . . $ QString#& working_directory =cxx . . $ QString#QString(ced63f7c635d850d). {}); |
| 42 | |
| 43 | // Returns contents of a file. |
| 44 | // Throws exception when no such file exists. |
| 45 | static QByteArraycxx . . $ QByteArray# readFilecxx . . $ IOFactory#readFile(743b31b35d83e992).(const QStringcxx . . $ QString#& file_path); |
| 46 | static void writeFilecxx . . $ IOFactory#writeFile(88f4c41ca0e941aa).(const QStringcxx . . $ QString#& file_path, const QByteArraycxx . . $ QByteArray#& data); |
| 47 | |
| 48 | // Copies file, overwrites destination. |
| 49 | static bool copyFilecxx . . $ IOFactory#copyFile(edf9e4f73813982f).(const QStringcxx . . $ QString#& source, const QStringcxx . . $ QString#& destination); |
| 50 | |
| 51 | static void removeFoldercxx . . $ IOFactory#removeFolder(3520e46b33348bf6).(const QStringcxx . . $ QString#& path); |
| 52 | }; |
| 53 | |
| 54 | #endif // IOFACTORY_H |