summaryrefslogtreecommitdiff
path: root/docs/index.html
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2023-11-15 07:48:12 +0100
committerThijs Schreijer <thijs@thijsschreijer.nl>2023-11-15 19:17:57 +0100
commit048f3cec7a18e7a28146f03c3c9e5d89d9613028 (patch)
tree41e8630938542fe1ec79ba4eff4304d85b45835e /docs/index.html
parent5f3951a942fdc4bf489d8d590bfc891ac9548a23 (diff)
downloadluasystem-048f3cec7a18e7a28146f03c3c9e5d89d9613028.zip
chore(docs): render the documentation
Diffstat (limited to 'docs/index.html')
-rw-r--r--docs/index.html366
1 files changed, 366 insertions, 0 deletions
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..eb241c6
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,366 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Lua-System docs</title>
+ <link rel="stylesheet" href="ldoc.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<br/>
+<h1>Lua-System</h1>
+
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#environment_Functions">environment Functions</a></li>
+<li><a href="#random_Functions">random Functions</a></li>
+<li><a href="#term_Functions">term Functions</a></li>
+<li><a href="#time_Functions">time Functions</a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><strong>system</strong></li>
+</ul>
+<h2>Topics</h2>
+<ul class="">
+ <li><a href="topics/01-introduction.md.html">1. Introduction</a></li>
+ <li><a href="topics/CHANGELOG.md.html">CHANGELOG</a></li>
+ <li><a href="topics/LICENSE.md.html">MIT License</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>system</code></h1>
+<p>Platform independent system calls for Lua.</p>
+<p>
+
+</p>
+
+
+<h2><a href="#environment_Functions">environment Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#getenv">getenv (name)</a></td>
+ <td class="summary">Gets the value of an environment variable.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#getenvs">getenvs ()</a></td>
+ <td class="summary">Returns a table with all environment variables.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#setenv">setenv (name[, value])</a></td>
+ <td class="summary">Sets an environment variable.</td>
+ </tr>
+</table>
+<h2><a href="#random_Functions">random Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#random">random ([length=1])</a></td>
+ <td class="summary">Generate random bytes.</td>
+ </tr>
+</table>
+<h2><a href="#term_Functions">term Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#isatty">isatty (file)</a></td>
+ <td class="summary">Checks if a file-handle is a TTY.</td>
+ </tr>
+</table>
+<h2><a href="#time_Functions">time Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#gettime">gettime ()</a></td>
+ <td class="summary">Get system time.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#monotime">monotime ()</a></td>
+ <td class="summary">Get monotonic time.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#sleep">sleep (seconds[, precision=16])</a></td>
+ <td class="summary">Sleep without a busy loop.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="environment_Functions"></a>environment Functions</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "getenv"></a>
+ <strong>getenv (name)</strong>
+ </dt>
+ <dd>
+ Gets the value of an environment variable. </p>
+
+<p><strong>NOTE</strong>: Windows has multiple copies of environment variables. For this reason,
+the <a href="index.html#setenv">setenv</a> function will not work with Lua's <a href="https://www.lua.org/manual/5.1/manual.html#pdf-os.getenv">os.getenv</a> on Windows. If you want
+to use <a href="index.html#setenv">setenv</a> then consider patching <a href="https://www.lua.org/manual/5.1/manual.html#pdf-os.getenv">os.getenv</a> with this implementation of <a href="index.html#getenv">getenv</a>.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">name</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ name of the environment variable
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
+ value of the environment variable, or nil if the variable is not set
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "getenvs"></a>
+ <strong>getenvs ()</strong>
+ </dt>
+ <dd>
+ Returns a table with all environment variables.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
+ table with all environment variables and their values
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "setenv"></a>
+ <strong>setenv (name[, value])</strong>
+ </dt>
+ <dd>
+ Sets an environment variable. </p>
+
+<p><strong>NOTE</strong>: Windows has multiple copies of environment variables. For this reason, the
+<a href="index.html#setenv">setenv</a> function will not work with Lua's <a href="https://www.lua.org/manual/5.1/manual.html#pdf-os.getenv">os.getenv</a> on Windows. If you want to use
+it then consider patching <a href="https://www.lua.org/manual/5.1/manual.html#pdf-os.getenv">os.getenv</a> with the implementation of <a href="index.html#getenv">system.getenv</a>.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">name</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ name of the environment variable
+ </li>
+ <li><span class="parameter">value</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ value of the environment variable, if <code>nil</code> the variable will be deleted (on
+Windows, setting an empty string, will also delete the variable)
+ (<em>optional</em>)
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">boolean</span></span>
+ success
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="random_Functions"></a>random Functions</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "random"></a>
+ <strong>random ([length=1])</strong>
+ </dt>
+ <dd>
+ Generate random bytes.
+This uses <code>CryptGenRandom()</code> on Windows, and <code>/dev/urandom</code> on other platforms. It will return the
+requested number of bytes, or an error, never a partial result.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">length</span>
+ <span class="types"><span class="type">int</span></span>
+ number of bytes to get
+ (<em>default</em> 1)
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ string of random bytes
+ </ol>
+ <h3>Or</h3>
+ <ol>
+ <li>
+ <span class="types"><span class="type">nil</span></span>
+
+
+</li>
+ <li>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ error message</li>
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="term_Functions"></a>term Functions</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "isatty"></a>
+ <strong>isatty (file)</strong>
+ </dt>
+ <dd>
+ Checks if a file-handle is a TTY.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">file</span>
+ <span class="types"><span class="type">file</span></span>
+ the file-handle to check
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">boolean</span></span>
+ true if the file is a tty
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="time_Functions"></a>time Functions</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "gettime"></a>
+ <strong>gettime ()</strong>
+ </dt>
+ <dd>
+ Get system time.
+The time is returned as the seconds since the epoch (1 January 1970 00:00:00).
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ seconds (fractional)
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "monotime"></a>
+ <strong>monotime ()</strong>
+ </dt>
+ <dd>
+ Get monotonic time.
+The time is returned as the seconds since system start.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ seconds (fractional)
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "sleep"></a>
+ <strong>sleep (seconds[, precision=16])</strong>
+ </dt>
+ <dd>
+ Sleep without a busy loop.
+This function will sleep, without doing a busy-loop and wasting CPU cycles.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">seconds</span>
+ <span class="types"><span class="type">number</span></span>
+ seconds to sleep (fractional).
+ </li>
+ <li><span class="parameter">precision</span>
+ <span class="types"><span class="type">integer</span></span>
+ minimum stepsize in milliseconds (Windows only, ignored elsewhere)
+ (<em>default</em> 16)
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <code>true</code> on success, or <code>nil+err</code> on failure
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
+<i style="float:right;">Last updated 2023-11-15 07:42:18 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>