Using PathView to pass paths to APIs
This commit is contained in:
+13
-13
@@ -10,28 +10,28 @@ namespace fs
|
||||
class FS_API FolderPack : virtual public IPack
|
||||
{
|
||||
public:
|
||||
explicit FolderPack(AbsPath location);
|
||||
FolderPack(tl::lent_ref<IFilesystem> filesystem, AbsPath location);
|
||||
explicit FolderPack(AbsPathView location);
|
||||
FolderPack(tl::lent_ref<IFilesystem> filesystem, AbsPathView location);
|
||||
|
||||
~FolderPack() override = default;
|
||||
|
||||
OpenSourceResult openSource(const AbsPath& path, SourceFlags flags = SourceFlags()) const override;
|
||||
OpenStreamSourceResult openStreamSource(const AbsPath& path, SourceFlags flags = SourceFlags()) const override;
|
||||
OpenMapSourceResult openMapSource(const AbsPath& path, MapView mapView = MapView(), SourceFlags flags = SourceFlags()) const override;
|
||||
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(const AbsPath& path) const override;
|
||||
IsFolderResult isFolder(const AbsPath& path) const override;
|
||||
ExistsResult exists(const AbsPath& path) const override;
|
||||
IsFileResult isFile(AbsPathView path) const override;
|
||||
IsFolderResult isFolder(AbsPathView path) const override;
|
||||
ExistsResult exists(AbsPathView path) const override;
|
||||
|
||||
GetStatResult getStat(const AbsPath& path) const override;
|
||||
GetStatResult getStat(AbsPathView path) const override;
|
||||
|
||||
cppcoro::generator<EnumerateEntry> enumerate(const AbsPath& path) const override;
|
||||
cppcoro::generator<EnumerateEntry> enumerateRecursively(const AbsPath& path) const override;
|
||||
cppcoro::generator<EnumerateEntry> enumerate(AbsPathView path) const override;
|
||||
cppcoro::generator<EnumerateEntry> enumerateRecursively(AbsPathView path) const override;
|
||||
|
||||
ConvertToNativePathResult convertToNativePath(const AbsPath& path) const override;
|
||||
ConvertToNativePathResult convertToNativePath(AbsPathView path) const override;
|
||||
|
||||
protected:
|
||||
AbsPath convertToUnderlyingPath(const AbsPath& path) const;
|
||||
AbsPath convertToUnderlyingPath(AbsPathView path) const;
|
||||
tl::lent_ref<IFilesystem> m_filesystem;
|
||||
AbsPath m_location;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user