Using PathView to pass paths to APIs
This commit is contained in:
+13
-13
@@ -23,24 +23,24 @@ public:
|
||||
typedef tl::result<tl::unique_ref<ZipPack>, Error> CreateResult;
|
||||
|
||||
static CreateResult create(tl::unique_ref<IMapSource> zipFileSource);
|
||||
static CreateResult create(tl::lent_ref<const IFilesystem> filesystem, AbsPath zipFileLocation);
|
||||
static CreateResult create(tl::lent_ref<const IFilesystem> filesystem, AbsPathView zipFileLocation);
|
||||
|
||||
virtual void setEncryptionData(const tl::string& key, uint32_t rounds);
|
||||
|
||||
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;
|
||||
|
||||
tl::result<AbsPath, Error> convertToNativePath(const AbsPath& path) const override;
|
||||
tl::result<AbsPath, Error> convertToNativePath(AbsPathView path) const override;
|
||||
|
||||
protected:
|
||||
struct File;
|
||||
@@ -48,7 +48,7 @@ protected:
|
||||
struct EntryIndex;
|
||||
|
||||
ZipPack(tl::unique_ref<IMapSource> zipFileSource, ZipReader zipReader);
|
||||
ZipPack(tl::lent_ref<const IFilesystem> filesystem, AbsPath zipFileLocation, ZipReader zipReader);
|
||||
ZipPack(tl::lent_ref<const IFilesystem> filesystem, AbsPathView zipFileLocation, ZipReader zipReader);
|
||||
|
||||
OpenMapSourceResult openRawMapSource(const File& file, MapView mapView) const;
|
||||
OpenSourceResult openRawSource(const File& file) const;
|
||||
@@ -57,7 +57,7 @@ protected:
|
||||
OpenMapSourceResult openZipMapSource(const File& file) const;
|
||||
OpenStreamSourceResult openZipStreamSource(const File& file) const;
|
||||
|
||||
uint16_t getOrAddFolder(AbsPath folderPath, tl::vector<tl::vector<EntryIndex>>& io_childrenIndices);
|
||||
uint16_t getOrAddFolder(AbsPathView folderPath, tl::vector<tl::vector<EntryIndex>>& io_childrenIndices);
|
||||
void createEntries(ZipReader zipReader);
|
||||
|
||||
struct File
|
||||
|
||||
Reference in New Issue
Block a user