#pragma once

#include "IPack.h"
#include "Mode.h"
#include "fs/Api.h"

namespace fs
{

class FS_API IWritablePack : virtual public IPack
{
public:
	using SinkFlag = IFilesystem::SinkFlag;
	using SinkFlags = IFilesystem::SinkFlags;

	virtual OpenSinkResult openSink(AbsPathView i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) = 0;
	virtual OpenStreamSinkResult openStreamSink(AbsPathView i_path, Mode i_mode, SinkFlags i_flags = SinkFlags()) = 0;
	virtual OpenMapSinkResult openMapSink(AbsPathView i_path, Mode i_mode, size_t i_size, SinkFlags i_flags = SinkFlags()) = 0;

	virtual RemoveResult remove(AbsPathView i_path) = 0;
	virtual RenameResult rename(AbsPathView i_path, AbsPathView i_newPath) = 0;

	virtual MakeFolderResult makeFolder(AbsPathView i_path) = 0;
	virtual RemoveRecursivelyResult removeRecursively(AbsPathView i_path) = 0;

	virtual SetWriteTimeResult setWriteTime(AbsPathView i_path, time_t i_time) = 0;
};

}
