Beginning in version 5 of the protocol, Net::SFTP::Session#rename accepts an optional flags argument that must be either 0 or a combination of these constants.
flags