'Save this L{KnownHostsFile} to the path it was loaded from.'

def save(self):

    p = self._savePath.parent()
    if (not p.isdir()):
        p.makedirs()
    if self._clobber:
        mode = 'wb'
    else:
        mode = 'ab'
    with self._savePath.open(mode) as hostsFileObj:
        if self._added:
            hostsFileObj.write(('\n'.join([entry.toString() for entry in self._added]) + '\n'))
            self._added = []
    self._clobber = False
