Save texture Render to the device's gallery

Hi,
i would like save RenderTexture to the device’s gallery(in adroid /iOS), i used this code:

void Canvas::saveCanvasCallback(cocos2d::Ref *sender) {

time_t t = time(0);
struct tm * timeinfo= localtime (&t);


char buffer[80];
strftime(buffer,80,"image %d-%m-%Y %I:%M:%S",timeinfo);

auto callback = [&](RenderTexture* rt, const std::string& path)
{
   
    MessageBox("Image saved ", path.c_str());
};

_target->saveToFile(buffer, Image::Format::PNG, true, callback);

CCLOG("Image saved %s \n", buffer);    


}

But, I can’t find it on my album, how can I save it to album for android and iOS devices?

Help me please.
Thanks