From bb4fd73c317cc88beb5e58c1abf52138abed107f Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Thu, 20 Jun 2024 23:16:29 +0200 Subject: Release v0.4.0 (#24) --- docs/index.html | 369 ++++++++++++-------------------------------------------- 1 file changed, 76 insertions(+), 293 deletions(-) (limited to 'docs/index.html') diff --git a/docs/index.html b/docs/index.html index cd95fc2..52c93fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,339 +27,122 @@

Lua-System

-

Contents

- +

Modules

+

Classes

+

Topics

+

Examples

+
-

Module system

-

Platform independent system calls for Lua.

-

- -

+

Platform independent system calls for Lua

-

environment Functions

- +

Modules

+
- - + + +
getenv (name)Gets the value of an environment variable.systemPlatform independent system calls for Lua.
+

Classes

+ - - + + +
getenvs ()Returns a table with all environment variables.bitflagsBitflags module.
+

Topics

+ - - + + -
setenv (name[, value])Sets an environment variable.01-introduction.md
-

random Functions

- - - + + -
random ([length=1])Generate random bytes.02-development.md
-

term Functions

- - - + + + + + + + + + +
isatty (file)Checks if a file-handle is a TTY.03-terminal.md
CHANGELOG.md
LICENSE.md
-

time Functions

- +

Examples

+
+ + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + +
compat.lua
flag_debugging.lua
password_input.lua
read.lua
readline.lua
gettime ()Get system time.spinner.lua
monotime ()Get monotonic time.spiral_snake.lua
sleep (seconds[, precision=16])Sleep without a busy loop.terminalsize.lua
-
-
- - -

environment Functions

- -
-
- - getenv (name) -
-
- Gets the value of an environment variable.

- -

NOTE: Windows has multiple copies of environment variables. For this reason, -the setenv function will not work with Lua's os.getenv on Windows. If you want -to use setenv then consider patching os.getenv with this implementation of getenv. - - -

Parameters:

-
    -
  • name - string - name of the environment variable -
  • -
- -

Returns:

-
    - - string or nil - value of the environment variable, or nil if the variable is not set -
- - - - -
-
- - getenvs () -
-
- Returns a table with all environment variables. - - - -

Returns:

-
    - - table - table with all environment variables and their values -
- - - - -
-
- - setenv (name[, value]) -
-
- Sets an environment variable.

- -

NOTE: Windows has multiple copies of environment variables. For this reason, the -setenv function will not work with Lua's os.getenv on Windows. If you want to use -it then consider patching os.getenv with the implementation of system.getenv. - - -

Parameters:

-
    -
  • name - string - name of the environment variable -
  • -
  • value - string - value of the environment variable, if nil the variable will be deleted (on -Windows, setting an empty string, will also delete the variable) - (optional) -
  • -
- -

Returns:

-
    - - boolean - success -
- - - - -
-
-

random Functions

- -
-
- - random ([length=1]) -
-
- Generate random bytes. -This uses CryptGenRandom() on Windows, and /dev/urandom on other platforms. It will return the -requested number of bytes, or an error, never a partial result. - - -

Parameters:

-
    -
  • length - int - number of bytes to get - (default 1) -
  • -
- -

Returns:

-
    - - string - string of random bytes -
-

Or

-
    -
  1. - nil - - -
  2. -
  3. - string - error message
  4. -
- - - - -
-
-

term Functions

- -
-
- - isatty (file) -
-
- Checks if a file-handle is a TTY. - - -

Parameters:

-
    -
  • file - file - the file-handle to check -
  • -
- -

Returns:

-
    - - boolean - true if the file is a tty -
- - - - -
-
-

time Functions

- -
-
- - gettime () -
-
- Get system time. -The time is returned as the seconds since the epoch (1 January 1970 00:00:00). - - - -

Returns:

-
    - - number - seconds (fractional) -
- - - - -
-
- - monotime () -
-
- Get monotonic time. -The time is returned as the seconds since system start. - - - -

Returns:

-
    - - number - seconds (fractional) -
- - - - -
-
- - sleep (seconds[, precision=16]) -
-
- Sleep without a busy loop. -This function will sleep, without doing a busy-loop and wasting CPU cycles. - - -

Parameters:

-
    -
  • seconds - number - seconds to sleep (fractional). -
  • -
  • precision - integer - minimum stepsize in milliseconds (Windows only, ignored elsewhere) - (default 16) -
  • -
- -

Returns:

-
    - - true on success, or nil+err on failure -
- - - - -
-
- -
-generated by LDoc 1.4.6 -Last updated 2023-12-15 13:15:09 +generated by LDoc 1.5.0 +Last updated 2024-06-20 23:11:37
-- cgit v1.2.3-55-g6feb