In class IDiskRemote, all metadata file system operations use os file system api directly.
There is little extendiability if we want store the metadata of HDFS or S3 into distributed file system.
So I suggest change this way by using DiskPtr and will propose a pull request.

In addition, metadata of HDFS or S3 only store local FS which is not sharable.

{
public:
    using Chunk = Aws::Vector<Aws::S3::Model::ObjectIdentifier>;
    using Chunks = std::list<Chunk>;
    explicit S3PathKeeper(size_t chunk_limit_) : RemoteFSPathKeeper(chunk_limit_) {}
    void addPath(const String & path) override
    {
        if (chunks.empty() || chunks.back().size() >= chunk_limit)
        {
            
            chunks.push_back(Chunks::value_type());
            chunks.back().reserve(chunk_limit);
        }
        Aws::S3::Model::ObjectIdentifier obj;
        obj.SetKey(path);
        chunks.back().push_back(obj);
    }
    void removePaths(Fn<void(Chunk &&)> auto && remove_chunk_func)