2,733
edits
Red Leader (talk | contribs) (→close(): Add example) |
Red Leader (talk | contribs) (→Functions: Doc dirname()) |
||
Line 31: | Line 31: | ||
=== dirname() === | === dirname() === | ||
{{Nasal doc | |||
|syntax = io.dirname(path); | |||
io. | |version = 3.0 | ||
|commit = {{fgdata commit|6ae3fa|t=commit}} | |||
|text = Returns the directory of a path as a string. | |||
|param1 = path | |||
|param1text = Path as a string. | |||
|example1 = var path = '/demo/demo.xml'; | |||
print(io.dirname(path)); # prints "/demo/" | |||
|example2 = var path = 'C:\FlightGear\FlightGear 3.2.0\data'; | |||
print(io.dirname(path)); # prints "C:/FlightGear/FlightGear 3.2.0/" | |||
}} | |||
=== flush() === | === flush() === |