#pragma once #include #include #include #include #include #include #include #include "searchfolder.h" #include "file.h" class FileIndexer { public: using map_t = std::multimap>; map_t index(const SearchFolder& sf); void setIgnoreDotFiles(bool b = true); void setIgnoreInodeIDs(bool b = true); private: void handleFolderContent(dirent* dircont, const SearchFolder& sf, std::list& newfolders, map_t& newfiles); void handleNewFile(ino_t inode, const std::string& path, map_t& newfiles); std::set knownInodes; // file inodes, that are known and should not be indexed again bool ignoredotfiles = false; bool ignoreInodeID = false; };