30#include <sptk5/CSmallPixmapIDs.h>
31#include <sptk5/MemoryDS.h>
32#include <sptk5/RegularExpression.h>
33#include <sptk5/Strings.h>
34#include <sptk5/sptk-config.h>
47static constexpr int DDS_SHOW_ALL = 0;
48static constexpr int DDS_HIDE_FILES = 1;
49static constexpr int DDS_HIDE_DOT_FILES = 2;
50static constexpr int DDS_HIDE_DIRECTORIES = 4;
51static constexpr int DDS_NO_SORT = 8;
75 , m_showPolicy(_showPolicy)
77 if (!_directory.empty())
79 directory(_directory);
81 if (!_pattern.empty())
125 for (
const auto& pattern: patterns)
127 auto matchPattern = wildcardToRegexp(pattern);
128 m_patterns.push_back(matchPattern);
162 std::vector<std::shared_ptr<RegularExpression>> m_patterns;
181 FieldList makeFileListEntry(
const fs::directory_entry& file,
size_t& index)
const;
Definition: DateTime.h:86
Directory datasource.
Definition: DirectoryDS.h:64
static String getFileType(const fs::directory_entry &file, CSmallPixmapType &image, DateTime &modificationTime)
int showPolicy() const
Definition: DirectoryDS.h:91
void showPolicy(int type)
Definition: DirectoryDS.h:99
void directory(const String &d)
String directory() const
Definition: DirectoryDS.h:112
void pattern(const String &wildcards)
Definition: DirectoryDS.h:121
DirectoryDS(const String &_directory="", const String &_pattern="", int _showPolicy=0)
Definition: DirectoryDS.h:73
static std::shared_ptr< RegularExpression > wildcardToRegexp(const String &wildcard)
Definition: FieldList.h:50
Base (memory) datasource.
Definition: MemoryDS.h:52
CSmallPixmapType
Definition: CSmallPixmapIDs.h:42