41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#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<IFilesystem> 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<EnumerateEntry> enumerate(AbsPathView path) const override;
|
|
cppcoro::generator<EnumerateEntry> enumerateRecursively(AbsPathView path) const override;
|
|
|
|
ConvertToNativePathResult convertToNativePath(AbsPathView path) const override;
|
|
|
|
protected:
|
|
AbsPath convertToUnderlyingPath(AbsPathView path) const;
|
|
tl::lent_ref<IFilesystem> m_filesystem;
|
|
AbsPath m_location;
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
}
|