swift
samplesfile.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
6 
7 #include "samplesfile.h"
8 
9 #include "misc/directoryutils.h"
10 #include "misc/stringutils.h"
11 
12 using namespace swift::misc;
13 
14 namespace swift::sample
15 {
16  int CSamplesFile::samples(QTextStream &out)
17  {
18  const QString dir = "R:/temp";
19  out << "Testing directory search " << dir << Qt::endl;
20  const bool f = CDirectoryUtils::containsFileInDir(dir, "*.air", true);
21  out << "Found " << boolToYesNo(f) << Qt::endl;
22  return 0;
23  }
24 
25 } // namespace swift::sample
static bool containsFileInDir(const QString &dir, const QString &filter, bool recursively)
Any file with filter like "*.txt".
Free functions in swift::misc.
SWIFT_MISC_EXPORT const QString & boolToYesNo(bool v)
Bool to yes/no.