mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 14:48:40 +01:00
107 lines
3.5 KiB
HTML
107 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
|
<title>Process Class – Wren</title>
|
|
<script type="application/javascript" src="../../../prism.js" data-manual></script>
|
|
<script type="application/javascript" src="../../../wren.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="../../../prism.css" />
|
|
<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">
|
|
<a href="../../../"><img src="../../../wren.svg" class="logo"></a>
|
|
<ul>
|
|
<li><a href="../../">Back to Wren CLI</a></li>
|
|
<li><a href="../">Back to CLI Modules</a></li>
|
|
<li><a href="./">os module</a></li>
|
|
</ul>
|
|
<section>
|
|
<h2>os classes</h2>
|
|
<ul>
|
|
<li><a href="platform.html">Platform</a></li>
|
|
<li><a href="process.html">Process</a></li>
|
|
</ul>
|
|
</section>
|
|
</nav>
|
|
<nav class="small">
|
|
<table>
|
|
<tr>
|
|
<td><a href="../">Back to CLI Modules</a></td>
|
|
<td><a href="./">os module</a></td>
|
|
</tr>
|
|
<tr>
|
|
<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>
|
|
<td>
|
|
<ul>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</nav>
|
|
<main>
|
|
<h1>Process Class</h1>
|
|
<p>The Process class lets you work with operating system 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>
|
|
<pre><code>$ wren file.wren arg
|
|
</code></pre>
|
|
<p>This returns:</p>
|
|
<pre class="snippet">
|
|
System.print(Process.allArguments) //> ["wren", "file.wren", "arg"]
|
|
</pre>
|
|
|
|
<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>
|
|
<pre><code>$ wren file.wren arg
|
|
</code></pre>
|
|
<p>This returns:</p>
|
|
<pre class="snippet">
|
|
System.print(Process.arguments) //> ["arg"]
|
|
</pre>
|
|
</main>
|
|
</div>
|
|
<footer>
|
|
<div class="page">
|
|
<div class="main-column">
|
|
<p>Wren lives
|
|
<a href="https://github.com/wren-lang/wren">on GitHub</a>
|
|
— Made with ❤ by
|
|
<a href="http://journal.stuffwithstuff.com/">Bob Nystrom</a> and
|
|
<a href="https://github.com/wren-lang/wren/blob/main/AUTHORS">friends</a>.
|
|
</p>
|
|
<div class="main-column">
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|