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).
| 1891 | // subdirs are included (matches the runtime watcher's behaviour -- |
| 1892 | // the watcher's AddTree() visits hidden too). |
| 1893 | void 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 |
no test coverage detected