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:
    RemoteDiskDirectoryIterator() {}
    RemoteDiskDirectoryIterator(const String & full_path, const String & folder_path_) : iter(full_path), folder_path(folder_path_) {}
    void next() override { ++iter; }
    bool isValid() const override { return iter != fs::directory_iterator(); }
    String path() const override
    {
        if (fs::is_directory(iter->path()))
            return folder_path / iter->path().filename().string() / "";
        else
            return folder_path / iter->path().filename().string();
    }
    String name() const override { return iter->path().filename(); }
private:
    fs::directory_iterator iter;
    fs::path folder_path;
};
class DiskRemoteReservation final : public IReservation