code: def _write(self, content, mode, encoding=None, linesep=False):
          
          makedirs(self.path)
          try:
              encoding = encoding or ENCODING
              if "b" not in mode:
                  try:
                      content = str(content)
                  except:
                      pass
                  if linesep:
                      content += os.linesep
              with codecs.open(self.path, mode, encoding=encoding) as fo:
                  fo.write(content)
                  return True
          except:
              return False
docs: Handles file writes.