Confusion with ComponentSettings file API
Suppose someone is trying to get the directory of the instruments.xml file of their Default profile. There are a couple different options:
var test1 = ComponentSettings.GetSettingsDirectory("Default");
var test2 = ComponentSettings.GetSettingsDirectory("Default", true);
var test3 = ComponentSettings.GetSettingsDirectory("Bench");
var test4 = ComponentSettings.GetSaveFilePath(typeof(IInstrument));
test1: "C:\Program Files\Keysight\Test Automation\Settings\Default\Default"
test2: "C:\Program Files\Keysight\Test Automation\Settings\Default\Default"
test3: "C:\Program Files\Keysight\Test Automation\Settings\Bench\Default"
test4: "C:\Program Files\Keysight\Test Automation\Settings\Instrument.xml"
- I guess makes sense because the input should be a Group not a profile. Not actually a real path.
- Seems confusing since Profile is set to true. Not actually a real path.
- The closest to correct. It is a bit confusing that "Default" gets appended on. Is a real path.
- Skips the "Bench\Default" part of the path and the name of the file is actually "Instruments.xml". Not actually a real path.
This API is a bit confusing