def _save(self, name, content):
        full_path = self.path(name)
        directory = os.path.dirname(full_path)
        try:
            self.create_folder(directory)
        except StorageException, e:
            if e.status_code != 409:
                raise e

        with open(full_path, 'wb') as destination:
            buffer_size = 16384
            # we should allow strings to be passed as content since the other
            # drivers support this too
            if isinstance(content, basestring):
                io = StringIO.StringIO()
                io.write(content)
                content = io

            content.seek(0)
            try:
                shutil.copyfileobj(content, destination, buffer_size)
            except __HOLE__, e:
                reraise(e)
        return self.file_class(self, name)
dataset/ETHPy150Open kvesteri/flask-storage/flask_storage/filesystem.py/FileSystemStorage._save