def _update_filestore(self, func, *args, **kwargs):
        """Helps create or update a single resource on filestore.
        To create a resource, you must supply either `url`, `filepath`, or
        `fileobj`.

        Args:
            func (func): The resource passed to resource_create.
            *args: Postional arguments that are passed to `func`
            **kwargs: Keyword arguments that are passed to `func`.

        Kwargs:
            url (str): New file url (for file link).
            fileobj (obj): New file like object (for file upload).
            filepath (str): New file path (for file upload).
            name (str): The resource name.
            description (str): The resource description.
            hash (str): The resource hash.

        Returns:
            obj: requests.Response object if `post` option is specified,
                ckan resource object otherwise.

        See also:
            ckanutils.get_filestore_update_func

        Examples:
            >>> ckan = CKAN(quiet=True)
            >>> url = 'http://example.com/file'
            >>> resource = {'package_id': 'pid'}
            >>> kwargs = {'name': 'name', 'url': url, 'format': 'csv'}
            >>> res = ckan.get_filestore_update_func(resource, **kwargs)
            >>> ckan._update_filestore(res[0], *res[1], **res[2])
            Package `pid` was not found.
            >>> resource['resource_id'] = 'rid'
            >>> res = ckan.get_filestore_update_func(resource, **kwargs)
            >>> ckan._update_filestore(res[0], *res[1], **res[2])
            Resource `rid` was not found in filestore.
        """
        data = kwargs.get('data', {})
        files = kwargs.get('files', {})
        resource_id = kwargs.get('resource_id', data.get('resource_id'))
        package_id = kwargs.get('package_id', data.get('package_id'))
        f = kwargs.get('upload', files.get('upload'))
        err_msg = 'Resource `%s` was not found in filestore.' % resource_id

        try:
            r = func(*args, **kwargs) or {'id': None}
        except NotFound:
            pck_msg = 'Package `%s` was not found.' % package_id
            print(err_msg if resource_id else pck_msg)
        except ValidationError as err:
            if err.error_dict.get('resource_id') == ['Not found: Resource']:
                print(err_msg)
                r = None
            else:
                raise err
        except requests.exceptions.ConnectionError as err:
            if 'Broken pipe' in err.message[1]:
                print('File size too large. Try uploading a smaller file.')
                r = None
            else:
                raise err
        else:
            return r
        finally:
            f.close() if f else None