#pragma once #include "fs/IPack.h" #include "fs/Api.h" namespace fs { ////////////////////////////////////////////////////////////////////////// class FS_API FolderPack : virtual public IPack { public: explicit FolderPack(AbsPathView location); FolderPack(tl::lent_ref filesystem, AbsPathView location); ~FolderPack() override = default; OpenSourceResult openSource(AbsPathView path, SourceFlags flags = SourceFlags()) const override; OpenStreamSourceResult openStreamSource(AbsPathView path, SourceFlags flags = SourceFlags()) const override; OpenMapSourceResult openMapSource(AbsPathView path, MapView mapView = MapView(), SourceFlags flags = SourceFlags()) const override; IsFileResult isFile(AbsPathView path) const override; IsFolderResult isFolder(AbsPathView path) const override; ExistsResult exists(AbsPathView path) const override; GetStatResult getStat(AbsPathView path) const override; cppcoro::generator enumerate(AbsPath path) const override; cppcoro::generator enumerateRecursively(AbsPath path) const override; ConvertToNativePathResult convertToNativePath(AbsPathView path) const override; protected: AbsPath convertToUnderlyingPath(AbsPathView path) const; tl::lent_ref m_filesystem; AbsPath m_location; }; ////////////////////////////////////////////////////////////////////////// }