Mantid
Loading...
Searching...
No Matches
Glob.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#include "MantidKernel/Glob.h"
8
9namespace Mantid::Kernel {
10
33void Glob::glob(const Poco::Path &pathPattern, std::set<std::string> &files, int options) {
34#ifdef _WIN32
35 // There appears to be a bug in the glob for windows.
36 // Putting case sensitive on then with reference to test
37 // testFindFileCaseSensitive()
38 // in FileFinderTest on Windows it is able to find "CSp78173.Raw" as it should
39 // even
40 // the case is wrong, but for some strange reason it then cannot find
41 // IDF_for_UNiT_TESTiNG.xMl!!!!
42 // Hence the reason to circumvent this by this #ifdef
43 Poco::Glob::glob(Poco::Path(pathPattern.toString()), files, Poco::Glob::GLOB_CASELESS);
44#else
45 Poco::Glob::glob(Poco::Path(pathPattern.toString()), files, options);
46#endif
47}
48
49} // namespace Mantid::Kernel
static void glob(const Poco::Path &pathPattern, std::set< std::string > &files, int options=0)
Creates a set of files that match the given pathPattern.
Definition: Glob.cpp:33