Files
wren/cli/modules/io/stat.html
2020-06-12 17:15:45 +00:00

120 lines
5.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Stat Class &ndash; 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="./">io module</a></li>
</ul>
<section>
<h2>io classes</h2>
<ul>
<li><a href="directory.html">Directory</a></li>
<li><a href="file.html">File</a></li>
<li><a href="file-flags.html">FileFlags</a></li>
<li><a href="stat.html">Stat</a></li>
<li><a href="stdin.html">Stdin</a></li>
<li><a href="stdout.html">Stdout</a></li>
</ul>
</section>
</nav>
<nav class="small">
<table>
<tr>
<td><a href="../">Back to CLI Modules</a></td>
<td><a href="./">io module</a></td>
</tr>
<tr>
<td colspan="2"><h2>io classes</h2></td>
</tr>
<tr>
<td>
<ul>
<li><a href="directory.html">Directory</a></li>
<li><a href="file.html">File</a></li>
<li><a href="file-flags.html">FileFlags</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="stat.html">Stat</a></li>
<li><a href="stdin.html">Stdin</a></li>
<li><a href="stdout.html">Stdout</a></li>
</ul>
</td>
</tr>
</table>
</nav>
<main>
<h1>Stat Class</h1>
<p>A data structure describing the low-level details of a file system entry.</p>
<h2>Static Methods <a href="#static-methods" name="static-methods" class="header-anchor">#</a></h2>
<h3>Stat.<strong>path</strong>(path) <a href="#stat.path(path)" name="stat.path(path)" class="header-anchor">#</a></h3>
<p>&ldquo;Stats&rdquo; the file or directory at <code>path</code>.</p>
<h2>Methods <a href="#methods" name="methods" class="header-anchor">#</a></h2>
<h3><strong>blockCount</strong> <a href="#blockcount" name="blockcount" class="header-anchor">#</a></h3>
<p>The number of system blocks allocated on disk for the file.</p>
<h3><strong>blockSize</strong> <a href="#blocksize" name="blocksize" class="header-anchor">#</a></h3>
<p>The preferred block size in bytes for interacting with the file. It may vary
from file to file.</p>
<h3><strong>device</strong> <a href="#device" name="device" class="header-anchor">#</a></h3>
<p>The ID of the device containing the entry.</p>
<h3><strong>group</strong> <a href="#group" name="group" class="header-anchor">#</a></h3>
<p>Numeric group ID of the file&rsquo;s owner.</p>
<h3><strong>inode</strong> <a href="#inode" name="inode" class="header-anchor">#</a></h3>
<p>The <a href="https://en.wikipedia.org/wiki/Inode">inode</a> number of the entry.</p>
<h3><strong>isDirectory</strong> <a href="#isdirectory" name="isdirectory" class="header-anchor">#</a></h3>
<p>Whether the file system entity is a directory.</p>
<h3><strong>isFile</strong> <a href="#isfile" name="isfile" class="header-anchor">#</a></h3>
<p>Whether the file system entity is a regular file, as opposed to a directory or
other special entity.</p>
<h3><strong>linkCount</strong> <a href="#linkcount" name="linkcount" class="header-anchor">#</a></h3>
<p>The number of hard links to the entry.</p>
<h3><strong>mode</strong> <a href="#mode" name="mode" class="header-anchor">#</a></h3>
<p>A bit field describing the entry&rsquo;s type and protection flags.</p>
<h3><strong>size</strong> <a href="#size" name="size" class="header-anchor">#</a></h3>
<p>The size of the entry in bytes.</p>
<h3><strong>specialDevice</strong> <a href="#specialdevice" name="specialdevice" class="header-anchor">#</a></h3>
<p>The device ID for the entry, if it&rsquo;s a special file.</p>
<h3><strong>user</strong> <a href="#user" name="user" class="header-anchor">#</a></h3>
<p>Numeric user ID of the file&rsquo;s owner.</p>
</main>
</div>
<footer>
<div class="page">
<div class="main-column">
<p>Wren lives
<a href="https://github.com/wren-lang/wren">on GitHub</a>
&mdash; Made with &#x2764; 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>