| 45 | bool ensureFolderPathExists(QString filenamepath); |
| 46 | |
| 47 | class copy |
| 48 | { |
| 49 | public: |
| 50 | copy(const QString & src, const QString & dst) |
| 51 | { |
| 52 | m_src = src; |
| 53 | m_dst = dst; |
| 54 | } |
| 55 | copy & followSymlinks(const bool follow) |
| 56 | { |
| 57 | m_followSymlinks = follow; |
| 58 | return *this; |
| 59 | } |
| 60 | copy & blacklist(const IPathMatcher * filter) |
| 61 | { |
| 62 | m_blacklist = filter; |
| 63 | return *this; |
| 64 | } |
| 65 | bool operator()() |
| 66 | { |
| 67 | return operator()(QString()); |
| 68 | } |
| 69 | |
| 70 | private: |
| 71 | bool operator()(const QString &offset); |
| 72 | |
| 73 | private: |
| 74 | bool m_followSymlinks = true; |
| 75 | const IPathMatcher * m_blacklist = nullptr; |
| 76 | QDir m_src; |
| 77 | QDir m_dst; |
| 78 | }; |
| 79 | |
| 80 | /** |
| 81 | * Delete a folder recursively |
no outgoing calls
no test coverage detected