# File lib/ole/storage/file_system.rb, line 207
      def rename from_path, to_path
        # check what we want to rename from exists. do it this
        # way to allow directories.
        dirent = @ole.dirent_from_path from_path
        raise Errno::ENOENT, from_path unless dirent
        # delete what we want to rename to if necessary
        begin
          unlink to_path
        rescue Errno::ENOENT
          # we actually get here, but rcov doesn't think so. add 1 + 1 to
          # keep rcov happy for now... :)
          1 + 1
        end
        # reparent the dirent
        to_parent_path, to_basename = File.split expand_path(to_path)
        from_parent = dirent.parent
        to_parent = @ole.dir.send :dirent_from_path, to_parent_path, to_path
        from_parent.delete dirent, false
        # and also change its name
        dirent.name = to_basename
        to_parent << dirent
        0
      end