mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
29f9117e58
commit
4648b82b33
@ -418,7 +418,7 @@ bool Utility::Glob(const String& pathSpec, const boost::function<void (const Str
|
|||||||
* @param callback The callback which is invoked for each matching file.
|
* @param callback The callback which is invoked for each matching file.
|
||||||
* @param type The file type (a combination of GlobFile and GlobDirectory)
|
* @param type The file type (a combination of GlobFile and GlobDirectory)
|
||||||
*/
|
*/
|
||||||
void Utility::GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type)
|
bool Utility::GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
@ -463,8 +463,6 @@ void Utility::GlobRecursive(const String& path, const String& pattern, const boo
|
|||||||
<< boost::errinfo_api_function("FindClose")
|
<< boost::errinfo_api_function("FindClose")
|
||||||
<< errinfo_win32_error(GetLastError()));
|
<< errinfo_win32_error(GetLastError()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
|
|
||||||
@ -521,6 +519,8 @@ void Utility::GlobRecursive(const String& path, const String& pattern, const boo
|
|||||||
callback(cpath);
|
callback(cpath);
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
static String NewUniqueID(void);
|
static String NewUniqueID(void);
|
||||||
|
|
||||||
static bool Glob(const String& pathSpec, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
|
static bool Glob(const String& pathSpec, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
|
||||||
static void GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
|
static bool GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
|
||||||
|
|
||||||
static void QueueAsyncCallback(const boost::function<void (void)>& callback);
|
static void QueueAsyncCallback(const boost::function<void (void)>& callback);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user