SetDataDirectory static method

int SetDataDirectory({
  1. required String directoryPath,
})

In case you want to change the default directory used by LexActivator to store the activation data on Linux and macOS, this function can be used to set it to directoryPath which is the absolute path of the directory.

If you decide to use this function, then it must be called on every start of your program before calling SetProductFile() or SetProductData() function. Please ensure that the directory exists and your app has read and write permissions in the directory.

The function throws a LexActivatorException on error.

Implementation

static int SetDataDirectory({required String directoryPath}) {
  int status = _lexActivatorNative.SetDataDirectory(
    directoryPath,
  );
  if (LexStatusCodes.LA_OK != status) {
    throw LexActivatorException(status);
  }
  return status;
}