Skip to content

Commit

Permalink
Add Lua os library section (#2671)
Browse files Browse the repository at this point in the history
in redis/redis#12971 we expose a new Lua os api os.clock().
  • Loading branch information
sundb authored Mar 8, 2024
1 parent 9d4eadf commit 7f18c04
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit 7f18c04

Please sign in to comment.