<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>STAT</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-E.html" title="Appendix E. Asterisk Dialplan Functions" /><link rel="prev" href="asterisk-APP-E-58.html" title="SPRINTF" /><link rel="next" href="asterisk-APP-E-60.html" title="STRFTIME" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">STAT</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-E-58.html">Prev</a> </td><th width="60%" align="center">Appendix E. Asterisk Dialplan Functions</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-E-60.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-E-59"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>STAT — Evaluates filesystem attributes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2811"></a><pre class="programlisting">STAT(<em class="replaceable"><code>flag</code></em>,<em class="replaceable"><code>filename</code></em>)</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4221806"></a><h2></h2><p><a id="I_indexterm_tt2812" class="indexterm"></a>Does a check on the specified file.</p><p><em class="replaceable"><code>flag</code></em> may be one of the following options:</p><div class="variablelist"><dl><dt><span class="term"> <code class="literal">e</code> </span></dt><dd><p>Returns <code class="literal">1</code> if the file exists; <code class="literal">0</code> otherwise</p></dd><dt><span class="term"> <code class="literal">s</code> </span></dt><dd><p>Returns the size of the file, in bytes</p></dd><dt><span class="term"> <code class="literal">f</code> </span></dt><dd><p>Returns <code class="literal">1</code> if the path referenced is a regular file (and not a directory, symlink, socket, or device) or <code class="literal">0</code> otherwise</p></dd><dt><span class="term"> <code class="literal">d</code> </span></dt><dd><p>Returns <code class="literal">1</code> if the path referenced is a directory (and not a regular file, symlink, socket, or device) or <code class="literal">0</code> otherwise</p></dd><dt><span class="term"> <code class="literal">M</code> </span></dt><dd><p>Returns the epoch time when the file contents were last modified</p></dd><dt><span class="term"> <code class="literal">C</code> </span></dt><dd><p>Returns the epoch time when the file inode was last modified</p></dd><dt><span class="term"> <code class="literal">m</code> </span></dt><dd><p>Returns the permissions mode of the file (as an octal number)</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-E-58.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-E.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-E-60.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SPRINTF </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> STRFTIME</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br /> This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br /> To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>