Add a Platform class.
- Rename the "process" module to "os". - Add Platform to it. - Static "name" method. - Static "isPosix" method. - Docs and tests!
This commit is contained in:
@@ -44,6 +44,6 @@ applications that want to embed Wren.
|
||||
[libuv]: http://libuv.org
|
||||
|
||||
* [io](io)
|
||||
* [process](process)
|
||||
* [os](os)
|
||||
* [scheduler](scheduler)
|
||||
* [timer](timer)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
^title Module "os"
|
||||
|
||||
The os module exposes classes for accessing capabilities provided by the
|
||||
underlying operating system.
|
||||
|
||||
* [Platform](platform.html)
|
||||
* [Process](process.html)
|
||||
@@ -0,0 +1,26 @@
|
||||
^title Platform Class
|
||||
|
||||
The Platform class exposes basic information about the operating system Wren is
|
||||
running on top of.
|
||||
|
||||
## Static Methods
|
||||
|
||||
### **name**
|
||||
|
||||
The name of the platform. This roughly describes the operating system, and is
|
||||
usually one of:
|
||||
|
||||
* "iOS"
|
||||
* "Linux"
|
||||
* "OS X"
|
||||
* "POSIX"
|
||||
* "Unix"
|
||||
* "Windows"
|
||||
|
||||
If Wren was compiled for an unknown operating system, returns "Unknown".
|
||||
|
||||
### **isPosix**
|
||||
|
||||
Returns `true` if the host operating system is known to support the POSIX
|
||||
standard. This is true for Linux and other Unices, as well as the various Apple
|
||||
operating systems.
|
||||
@@ -1,6 +1,6 @@
|
||||
^title Process Class
|
||||
|
||||
The Process class lets you work with operating processes, including the
|
||||
The Process class lets you work with operating system processes, including the
|
||||
currently running one.
|
||||
|
||||
## Static Methods
|
||||
@@ -22,11 +22,12 @@
|
||||
<nav class="big">
|
||||
<ul>
|
||||
<li><a href="../">Modules</a></li>
|
||||
<li><a href="./">process</a></li>
|
||||
<li><a href="./">os</a></li>
|
||||
</ul>
|
||||
<section>
|
||||
<h2>process classes</h2>
|
||||
<h2>os classes</h2>
|
||||
<ul>
|
||||
<li><a href="platform.html">Platform</a></li>
|
||||
<li><a href="process.html">Process</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -35,14 +36,15 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="../">Modules</a></td>
|
||||
<td><a href="./">process</a></td>
|
||||
<td><a href="./">os</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><h2>process classes</h2></td>
|
||||
<td colspan="2"><h2>os classes</h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="platform.html">Platform</a></li>
|
||||
<li><a href="process.html">Process</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
@@ -1,5 +0,0 @@
|
||||
^title Module "process"
|
||||
|
||||
The process module exposes a single class for working with operating processes.
|
||||
|
||||
* [Process](process.html)
|
||||
@@ -37,7 +37,7 @@
|
||||
<h2>cli</h2>
|
||||
<ul>
|
||||
<li><a href="io">io</a></li>
|
||||
<li><a href="process">process</a></li>
|
||||
<li><a href="os">os</a></li>
|
||||
<li><a href="scheduler">scheduler</a></li>
|
||||
<li><a href="timer">timer</a></li>
|
||||
</ul>
|
||||
@@ -65,7 +65,7 @@
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="io">io</a></li>
|
||||
<li><a href="process">process</a></li>
|
||||
<li><a href="os">os</a></li>
|
||||
<li><a href="scheduler">scheduler</a></li>
|
||||
<li><a href="timer">timer</a></li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user