2,733
edits
(→create_dir(): Document the method) |
Red Leader (talk | contribs) (Complete create_dir() doc) |
||
Line 135: | Line 135: | ||
{{Nasal doc | {{Nasal doc | ||
|syntax = os.path.create_dir(); | |syntax = os.path.create_dir(); | ||
|text = | |text = Creates the parent of the path as a directory. This will only work if the path is absolute and considered as writable by {{func link|fgValidatePath()|link=https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/Main/util.cxx#l142}} (typically okay under [[$FG_HOME]]/Export). | ||
|example1 = var | |example1 = var path = os.path.new(getprop("/sim/fg-home") ~ "/Export/test/demo.txt"); | ||
path.create_dir(); # Creates $FG_HOME/Export/test/ | |||
}} | }} | ||