code: def rename(self, old_file_path, new_file_path, dir_fd=None):
          
          old_file_path = self._path_with_dir_fd(
              old_file_path, self.rename, dir_fd)
          self.filesystem.rename(old_file_path, new_file_path)
docs: Rename a FakeFile object at old_file_path to new_file_path,
          preserving all properties.
          Also replaces existing new_file_path object, if one existed
          (Unix only).
  
          Args:
              old_file_path: Path to filesystem object to rename.
              new_file_path: Path to where the filesystem object will live
                  after this call.
              dir_fd: If not `None`, the file descriptor of a directory,
                  with `old_file_path` being relative to this directory.
                  New in Python 3.3.
  
          Raises:
              OSError: if old_file_path does not exist.
              OSError: if new_file_path is an existing directory.
              OSError: if new_file_path is an existing file (Windows only)
              OSError: if new_file_path is an existing file and could not
                  be removed (Unix)
              OSError: if `dirname(new_file)` does not exist
              OSError: if the file would be moved to another filesystem
                  (e.g. mount point)