Template:IO Restrictions: Difference between revisions
Jump to navigation
Jump to search
m (http://forum.flightgear.org/viewtopic.php?f=30&t=21615#p196502) |
No edit summary |
||
Line 1: | Line 1: | ||
<font color="red"><b>Note:</b> All FlightGear I/O handled via [[Nasal]] and/or fgcommands, is subject to validation via [[IORules]].</font> | <font color="red"><b>Note:</b> All FlightGear disk I/O handled via [[Nasal]] and/or fgcommands, is subject to validation via [[IORules]]. This includes the '''SGPath''' bindings in 2.99+</font> | ||
[[$ | However, unlike [[$FG_ROOT]] [[$FG_HOME]] is generally accessible for writing: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
Line 7: | Line 7: | ||
io.write_properties(path, "/sim"); | io.write_properties(path, "/sim"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For additional examples, see $FG_ROOT/Nasal/io.nas | |||
To learn more about PropertyList processing via loadxml and savexml, please see $FG_ROOT/Docs/README.commands |
Revision as of 12:28, 20 December 2013
Note: All FlightGear disk I/O handled via Nasal and/or fgcommands, is subject to validation via IORules. This includes the SGPath bindings in 2.99+
However, unlike $FG_ROOT $FG_HOME is generally accessible for writing:
var path = getprop("/sim/fg-home") ~ "/Export/test.xml";
io.write_properties(path, "/sim");
For additional examples, see $FG_ROOT/Nasal/io.nas To learn more about PropertyList processing via loadxml and savexml, please see $FG_ROOT/Docs/README.commands