def write (string, to, as: nil, quiet: false)
      cp StringIO.new(string), to, as: as, quiet: quiet
    end
def write (string, to, as: nil, quiet: false)
      cp StringIO.new(string), to, as: as, quiet: quiet
    end
Write a string to a host file.
 @api private