Using PathView to pass paths to APIs

This commit is contained in:
catalinvasile
2024-07-10 13:31:12 +02:00
parent d1ebc32f9d
commit 28b74b4056
499 changed files with 99851 additions and 300 deletions
+10 -10
View File
@@ -12,21 +12,21 @@ namespace fs
class FS_API WritableFolderPack final : virtual public IWritablePack, public FolderPack
{
public:
explicit WritableFolderPack(AbsPath location);
WritableFolderPack(tl::lent_ref<IFilesystem> filesystem, AbsPath location);
explicit WritableFolderPack(AbsPathView location);
WritableFolderPack(tl::lent_ref<IFilesystem> filesystem, AbsPathView location);
~WritableFolderPack() override = default;
OpenSinkResult openSink(const AbsPath& i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) override;
OpenStreamSinkResult openStreamSink(const AbsPath& i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) override;
OpenMapSinkResult openMapSink(const AbsPath& i_path, Mode i_mode, size_t i_size, SinkFlags i_flags = SinkFlags()) override;
OpenSinkResult openSink(AbsPathView i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) override;
OpenStreamSinkResult openStreamSink(AbsPathView i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) override;
OpenMapSinkResult openMapSink(AbsPathView i_path, Mode i_mode, size_t i_size, SinkFlags i_flags = SinkFlags()) override;
RemoveResult remove(const AbsPath& i_path) override;
RenameResult rename(const AbsPath& i_path, const AbsPath& i_newPath) override;
RemoveResult remove(AbsPathView i_path) override;
RenameResult rename(AbsPathView i_path, AbsPathView i_newPath) override;
MakeFolderResult makeFolder(const AbsPath& i_path) override;
RemoveRecursivelyResult removeRecursively(const AbsPath& i_path) override;
MakeFolderResult makeFolder(AbsPathView i_path) override;
RemoveRecursivelyResult removeRecursively(AbsPathView i_path) override;
SetWriteTimeResult setWriteTime(const AbsPath& i_path, time_t i_time) override;
SetWriteTimeResult setWriteTime(AbsPathView i_path, time_t i_time) override;
};
}