'Method Docs.'

def write(self, text, append=False):

    if self._is_readonly:
        return
    mode = u'w'
    if append:
        mode = u'a'
    if (not os.path.isdir(self._dir)):
        os.makedirs(self._dir)
    try:
        with codecs.open(self._path, mode, self._encoding, u'ignore') as f:
            f.write(text)
    except (IOError, UnicodeError):
        pass
