Properties

Checking property defaults

As could be seen in Converting, we were able to overwrite files by enabling the property KVLC_PROPERTY_OVERWRITE.

To verifiy that KVLC_PROPERTY_OVERWRITE is in fact off by default we can do the following:

int defaultval;
...
printf("Overwrite on CSV, def. value: %d\n", defaultval);

We get the output:

Overwrite on CSV, def. value: 0

Setting properties

We begin by instantiating the converter and specifying the output file + format specifier:

int propval;
stat = kvlcCreateConverter(&hnd, "outputfile.kme50", KVLC_FILE_FORMAT_KME50);

We can now configure the converter for automatic overwrites.

propval = 1;
stat = kvlcSetProperty(hnd, KVLC_PROPERTY_OVERWRITE, &propval, sizeof(int));

Checking properties

The property KVLC_PROPERTY_OVERWRITE is available for all converters. Some however, aren't.

To check if a property is supported, we call the function kvlcIsPropertySupported.

int supported;
...
printf("Supported: %d\n", supported); // Supported: 0

We find that the property is not supported for KVLC_FILE_FORMAT_KME50.