MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / addDirectory

Method addDirectory

watcher/filewatcher.cpp:230–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228
229
230void 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
260void FileWatcher::exitPoint(ExitPoint *exit, Note &n) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected