MCPcopy Create free account
hub / github.com/amule-project/amule / ExpandRecursiveRoot

Function ExpandRecursiveRoot

src/Preferences.cpp:1893–1905  ·  view source on GitHub ↗

Walk `root` recursively, appending `root` itself and every descendant directory to `out`. Uses CDirIterator::Dir so hidden subdirs are included (matches the runtime watcher's behaviour -- the watcher's AddTree() visits hidden too).

Source from the content-addressed store, hash-verified

1891// subdirs are included (matches the runtime watcher's behaviour --
1892// the watcher's AddTree() visits hidden too).
1893void ExpandRecursiveRoot(const CPath & root, CPreferences::PathList & out)
1894{
1895 if (!root.IsOk() || !root.DirExists()) {
1896 return;
1897 }
1898 out.push_back(root);
1899 CDirIterator dir(root);
1900 for (CPath sub = dir.GetFirstFile(CDirIterator::Dir);
1901 sub.IsOk();
1902 sub = dir.GetNextFile()) {
1903 ExpandRecursiveRoot(root.JoinPaths(sub), out);
1904 }
1905}
1906
1907} // namespace
1908

Callers 1

ReloadSharedFoldersMethod · 0.85

Calls 5

DirExistsMethod · 0.80
GetFirstFileMethod · 0.80
GetNextFileMethod · 0.80
JoinPathsMethod · 0.80
IsOkMethod · 0.45

Tested by

no test coverage detected