Get a list of all keys stored in the kvs (read-only)
(self)
| 54 | |
| 55 | @property |
| 56 | def keys(self): |
| 57 | """Get a list of all keys stored in the kvs (read-only)""" |
| 58 | count = ctypes.c_ulonglong(0) |
| 59 | value = core.BNGetKeyValueStoreKeys(self.handle, count) |
| 60 | assert value is not None |
| 61 | |
| 62 | result = [] |
| 63 | try: |
| 64 | for i in range(0, count.value): |
| 65 | result.append(value[i]) |
| 66 | return result |
| 67 | finally: |
| 68 | core.BNFreeStringList(value, count) |
| 69 | |
| 70 | def get_value(self, key: str) -> databuffer.DataBuffer: |
| 71 | """Get the value for a single key""" |