'Get the expected filename with absolute path'

def get_filename(self, obj, **kwargs):

    base_dir = kwargs.get('base_dir', None)
    dir_only = kwargs.get('dir_only', False)
    obj_dir = kwargs.get('obj_dir', False)
    path = self._construct_path(obj, **kwargs)
    if (base_dir and dir_only and obj_dir):
        return os.path.abspath(path)
    cache_path = self._get_cache_path(path)
    if dir_only:
        if (not os.path.exists(cache_path)):
            os.makedirs(cache_path)
        return cache_path
    if self._in_cache(path):
        return cache_path
    elif self.exists(obj, **kwargs):
        if (not dir_only):
            self._pull_into_cache(path)
            return cache_path
    raise ObjectNotFound('objectstore.get_filename,    no    cache_path:    {obj},    kwargs:    {kwargs}'.format(obj, kwargs))
