| 228 | |
| 229 | |
| 230 | void FileWatcher::addDirectory(QString root) { |
| 231 | if (directories().contains(root)) |
| 232 | return; |
| 233 | |
| 234 | QStringList dirs; |
| 235 | QStringList files; |
| 236 | if (includeSubdirectories) { |
| 237 | setupSubDirectories(dirs, files, root); |
| 238 | if (!dirs.isEmpty()) |
| 239 | addPaths(dirs); |
| 240 | if (!files.isEmpty()) |
| 241 | addPaths(files); |
| 242 | } else { |
| 243 | setupDirectory(files, root); |
| 244 | if (!root.isEmpty()) |
| 245 | addPath(root); |
| 246 | if (!files.isEmpty()) |
| 247 | addPaths(files); |
| 248 | } |
| 249 | if (scanType == ImportDelete) { |
| 250 | for (int i=0; i<files.size(); i++) { |
| 251 | saveFile(files[i]); |
| 252 | } |
| 253 | } |
| 254 | if (scanType == ImportKeep) |
| 255 | saveFiles = files; |
| 256 | |
| 257 | } |
| 258 | |
| 259 | |
| 260 | void FileWatcher::exitPoint(ExitPoint *exit, Note &n) { |
nothing calls this directly
no outgoing calls
no test coverage detected