/*
 * Copyright © 2021-2026 Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
 */
#include "OneChanged.h"

namespace Test::ZipDirFs::Fuse
{
	namespace Fixtures
	{
		OneChanged::OneChanged(const fs::file_time_type& target) : called(false), time(target) {}
		bool OneChanged::operator()()
		{
			bool changed = !called;
			called = true;
			return changed;
		}
		OneChanged::operator FileTime() const { return called ? time : FileTime{}; }
	} // namespace Fixtures
} // namespace Test::ZipDirFs::Fuse
