私信  •  关注

junfeng qin

junfeng qin 最近创建的主题
junfeng qin 最近回复了
5 年前
回复了 junfeng qin 创建的主题 » 或者.rename(src,dest)throws文件在python中没有错误

您可以参考源代码

    def rename(self, remote_src, remote_dest):
    """rename a file or directory on the remote host.

    :param str remote_src: the remote file/directory to rename

    :param str remote_dest: the remote file/directory to put it

    :returns: None

    :raises: IOError

    """
    self._sftp_connect()
    self._sftp.rename(remote_src, remote_dest)