nvs::NVSHandle::find_key() method
Checks whether key exists and optionally returns also data type of associated entry.
Arguments
key
Key name. Maximum length is (NVS_KEY_NAME_MAX_SIZE-1) characters. Shouldn't be empty.
nvstype
Nvs data type to of entry, if it exists.
Return value
- ESP_OK if NVS entry for key provided was found. Data type will be returned via \c nvstype. - ESP_ERR_NVS_NOT_FOUND if the requested key doesn't exist. - ESP_ERR_NVS_INVALID_HANDLE if handle has been closed or is NULL. - ESP_FAIL if there is an internal error; most likely due to corrupted NVS partition (only if NVS assertion checks are disabled). - other error codes from the underlying storage driver.
nvs::NVSHandle::find_key() overrides 2 methodss:
![]()
nvs::NVSHandle::find_key()