const char * myqttd_datadir ( MyQttdCtx ctx)

Allows to get the MYQTTD_DATADIR path provided at compilation time.

This is configured when the libmyqttd.{dll,so} is built, ensuring all pieces uses the same data dir value.

The MYQTTD_DATADIR points to the base root directory where data files are located (mostly dtd files). Under unix system it is usually: /usr/share/myqtt. On windows system it is usually configured to: ../data.

The function can also return the value configured at the <global-settings/system-paths/path> if configured "datadir" is configured like:

1 &lt;system-paths>
2  &lt;path name='datadir' value='your-custom-path' />
3 &lt;/system-paths>
ctxThe myqttd ctx with the associated configuration where we are getting the sysconfdir. If NULL is provided, default value is returned.
The path currently configured by default or the value overrided on the configuration.