Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lua os library section #2671

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/interact/programmability/lua-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ The following [standard Lua libraries](https://www.lua.org/manual/5.1/manual.htm
* The [_String Manipulation (string)_ library](https://www.lua.org/manual/5.1/manual.html#5.4)
* The [_Table Manipulation (table)_ library](https://www.lua.org/manual/5.1/manual.html#5.5)
* The [_Mathematical Functions (math)_ library](https://www.lua.org/manual/5.1/manual.html#5.6)
* The [_Operating System Facilities (os)_ library](#os-library)

In addition, the following external libraries are loaded and accessible to scripts:

Expand All @@ -678,6 +679,18 @@ In addition, the following external libraries are loaded and accessible to scrip
* The [_cmsgpack_ library](#cmsgpack-library)
* The [_bitop_ library](#bitop-library)

### <a name="os-library"></a> _os_ library

* Since version: 8.0.0
* Available in scripts: yes
* Available in functions: yes

_os_ provides a set of functions for dealing with date, time, and system commands.
More details can be found in the [Operating System Facilities](https://www.lua.org/manual/5.1/manual.html#5.8).
Note that for sandbox security, currently only the following os functions is exposed:

* `os.clock()`

### <a name="struct-library"></a> _struct_ library

* Since version: 2.6.0
Expand Down
Loading