}
/* Create file on remote host, write it and close it */
- File fd(fullpath, dst_host, nullptr);
- fd.write(read_size);
+ auto* fd = File::open(fullpath, dst_host, nullptr);
+ fd->write(read_size);
+ fd->close();
return 0;
}
void sg_file_unlink(sg_file_t fd)
{
fd->unlink();
- delete fd;
+ fd->close();
}
/**