24 std::vector<limes::files::File> jsonFiles;
32 if (
const auto fileObj = file.getFileObject())
34 if (fileObj->hasFileExtension (
".json"))
35 jsonFiles.emplace_back (*fileObj);
41 jsonFiles.erase (std::find_if (jsonFiles.begin(), jsonFiles.end(),
44 return f.getAbsolutePath() == p;
56 if (
const auto fileObj = file.getFileObject())
58 if (! fileObj->hasFileExtension (
".json"))
61 const auto alreadyInList = (std::find (jsonFiles.begin(),
67 jsonFiles.emplace_back (*fileObj);
This class represents a directory on the filesystem.
bool contains(const FilesystemEntry &entry, std::size_t depthLimit=50) const
Returns true if this directory contains the passed FilesystemEntry.
This class listens for changes to or operations on a certain file, and receives callbacks to be notif...
This class represents a file on the filesystem.
The base class for any kind of object on the filesystem.
The main header for the limes_files library.
void fileDeleted(const limes::files::FilesystemEntry &file) final
Called when a file is deleted.
void fileCreated(const limes::files::FilesystemEntry &file) final
Called when a file or subdirectory is created in a watched directory.
void fileMoved(const limes::files::FilesystemEntry &file) final
Called when a file is moved or renamed.