Translated using Weblate (Chinese (Simplified))
[cygwin-setup.git] / FindVisitor.cc
blob99ae6fc4507fad7f1a9c16574297dc8c5f6ff65f
1 /*
2 * Copyright (c) 2002 Robert Collins.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
12 * Written by Robert Collins <robertc@hotmail.com>
16 #include "FindVisitor.h"
17 #include "find.h"
19 FindVisitor::FindVisitor(){}
20 FindVisitor::~FindVisitor(){}
22 // Allow non-interested visitors to skip Files.
23 void
24 FindVisitor::visitFile(const std::string& basePath, WIN32_FIND_DATA const *)
28 // Default to recursing through directories.
29 void
30 FindVisitor::visitDirectory(const std::string& basePath,
31 WIN32_FIND_DATA const *aDir, int level)
33 if (level-- > 0)
35 Find aFinder (basePath + aDir->cFileName);
36 aFinder.accept (*this, level);