Files
wren/modules/process/process.html
Bob Nystrom 8b6e6bc677 Fresh docs!
2016-01-24 15:41:12 -08:00

103 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Process Class &ndash; Wren</title>
<link rel="stylesheet" type="text/css" href="../../style.css" />
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic|Source+Code+Pro:400|Lato:400|Sanchez:400italic,400' rel='stylesheet' type='text/css'>
<!-- Tell mobile browsers we're optimized for them and they don't need to crop
the viewport. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
</head>
<body id="top" class="module">
<header>
<div class="page">
<div class="main-column">
<h1><a href="../../">wren</a></h1>
<h2>a classy little scripting language</h2>
</div>
</div>
</header>
<div class="page">
<nav class="big">
<ul>
<li><a href="../">Modules</a></li>
<li><a href="./">process</a></li>
</ul>
<section>
<h2>process classes</h2>
<ul>
<li><a href="process.html">Process</a></li>
</ul>
</section>
</nav>
<nav class="small">
<table>
<tr>
<td><a href="../">Modules</a></td>
<td><a href="./">process</a></td>
</tr>
<tr>
<td colspan="2"><h2>process classes</h2></td>
</tr>
<tr>
<td>
<ul>
<li><a href="process.html">Process</a></li>
</ul>
</td>
<td>
<ul>
</ul>
</td>
</tr>
</table>
</nav>
<main>
<h1>Process Class</h1>
<p>The Process class lets you work with operating processes, including the
currently running one. </p>
<h2>Static Methods <a href="#static-methods" name="static-methods" class="header-anchor">#</a></h2>
<h3><strong>allArguments</strong> <a href="#allarguments" name="allarguments" class="header-anchor">#</a></h3>
<p>The list of command-line arguments that were passed when the Wren process was
spawned. This includes the Wren executable itself, the path to the file being
run (if any), and any other options passed to Wren itself. </p>
<p>If you run: </p>
<div class="codehilite"><pre><span class="nv">$ </span>wren file.wren arg
</pre></div>
<p>This returns: </p>
<div class="codehilite"><pre><span class="vg">System</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="vg">Process</span><span class="o">.</span><span class="n">allArguments</span><span class="p">)</span> <span class="output">[&quot;wren&quot;, &quot;file.wren&quot;, &quot;arg&quot;]</span>
</pre></div>
<h3><strong>arguments</strong> <a href="#arguments" name="arguments" class="header-anchor">#</a></h3>
<p>The list of command-line arguments that were passed to your program when the
Wren process was spawned. This does not include arguments handled by Wren
itself. </p>
<p>If you run: </p>
<div class="codehilite"><pre><span class="nv">$ </span>wren file.wren arg
</pre></div>
<p>This returns: </p>
<div class="codehilite"><pre><span class="vg">System</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="vg">Process</span><span class="o">.</span><span class="n">arguments</span><span class="p">)</span> <span class="output">[&quot;arg&quot;]</span>
</pre></div>
</main>
</div>
<footer>
<div class="page">
<div class="main-column">
<p>Wren lives
<a href="https://github.com/munificent/wren">on GitHub</a>
&mdash; Made with &#x2764; by
<a href="http://journal.stuffwithstuff.com/">Bob Nystrom</a> and
<a href="https://github.com/munificent/wren/blob/master/AUTHORS">friends</a>.
</p>
<div class="main-column">
</div>
</footer>
</body>
</html>