/*
 * Copyright © 2020-2026 Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
 */
#ifndef ZIPDIRFS_COMPONENTS_NATIVEDIRECTORYENUMERATOR_H
#define ZIPDIRFS_COMPONENTS_NATIVEDIRECTORYENUMERATOR_H

#include "ZipDirFs/Containers/EntryIterator.h"
#include "ZipDirFs/Containers/Helpers/Enumerator.h"
#include <filesystem>
#include <string>

namespace ZipDirFs::Components
{
	namespace fs = std::filesystem;
	/**
	 * @brief An @link ZipDirFs::Containers::Helpers::Enumerator Enumerator @endlink for real directories
	 * @authors Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
	 */
	class NativeDirectoryEnumerator : public Containers::Helpers::Enumerator<std::string>
	{
		using iterator = Containers::EntryIterator;

	public:
		NativeDirectoryEnumerator(const fs::path&);
		~NativeDirectoryEnumerator() override;
		void reset() override;
		void next() override;
		bool valid() override;
		const std::string& current() override;

	protected:
		const fs::path& path;
		iterator currentIt;
		iterator endIt;
	};

} // namespace ZipDirFs::Components

#endif // ZIPDIRFS_COMPONENTS_NATIVEDIRECTORYENUMERATOR_H
