settings.save

From ComputerCraft Wiki
Revision as of 02:37, 10 June 2016 by Bomb Bloke (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=settings.save |args={{Type|string}} path |returns={{Type|boolean}} success |api=settings |addon=ComputerCraft |desc=Saves all current settings -...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function settings.save
Saves all current settings - including those loaded as defaults - to the specified file, as a serialised table.

If a file titled ".settings" is saved to the root of a computer's drive, it will be automatically loaded on startup (without need to call settings.load()).
Syntax settings.save(string path)
Returns boolean success
Part of ComputerCraft
API settings

Examples

Grid paper.png  Example
Disables use of startup files from floppies on subsequent reboots by saving a new default settings file.
Code
settings.set("shell.allow_disk_startup", false)
settings.save(".settings")


Grid disk.png Settings API Functions
settings.set - settings.get - settings.unset - settings.clear - settings.getNames - settings.load - settings.save