#include "Tactility/file/FileLock.h" #include #include namespace tt::file { class NoLock : public Lock { bool lock(TickType_t timeout) const override { return true; } bool unlock() const override { return true; } }; static std::shared_ptr noLock = std::make_shared(); std::shared_ptr getLock(const std::string& path) { auto sdcard_lock = hal::sdcard::findSdCardLock(path); if (sdcard_lock != nullptr) { return sdcard_lock; } else { return noLock; } } }