How to know the left free space in KVStore?

Hi

I’m using the KVStore with internal flash option. I reviewed the related source code files, but I can’t see an API can return the left free space. Or, should I will know that when kv_set return certain error code (it will not be too much helpful) ?