Write to file in spark core

You may want to check out the Persisting state thread. I believe what you’re interested in is being discussed at length in that thread. You wouldn’t store the settings in a file per se, but would be storing values in EEPROM/flash memory locations instead.