2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 07:05:15 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-dir">
|
2007-02-03 08:13:44 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>is_dir</refname>
|
|
|
|
<refpurpose>Tells whether the filename is a directory</refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-16 01:17:14 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-02-03 08:13:44 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>is_dir</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-06-16 01:17:14 +00:00
|
|
|
Tells whether the given filename is a directory.
|
2007-02-03 08:13:44 +00:00
|
|
|
</para>
|
2007-06-16 01:17:14 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>filename</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Path to the file. If <parameter>filename</parameter> is a relative
|
|
|
|
filename, it will be checked relative to the current working
|
2009-02-27 16:49:08 +00:00
|
|
|
directory. If <parameter>filename</parameter> is a symbolic or hard link
|
2010-01-25 15:53:23 +00:00
|
|
|
then the link will be resolved and checked. If you have enabled &safemode;,
|
|
|
|
or <link linkend="ini.open-basedir">open_basedir</link> further
|
|
|
|
restrictions may apply.
|
2007-06-16 01:17:14 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns &true; if the filename exists and is a directory, &false;
|
|
|
|
otherwise.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-02-03 08:13:44 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>is_dir</function> example</title>
|
|
|
|
<programlisting role="php">
|
2004-01-02 17:24:29 +00:00
|
|
|
<![CDATA[
|
2007-02-05 18:03:39 +00:00
|
|
|
<?php
|
2008-03-18 19:36:40 +00:00
|
|
|
var_dump(is_dir('a_file.txt'));
|
|
|
|
var_dump(is_dir('bogus_dir/abc'));
|
2004-01-02 17:24:29 +00:00
|
|
|
|
|
|
|
var_dump(is_dir('..')); //one dir up
|
|
|
|
?>
|
|
|
|
]]>
|
2007-02-03 08:13:44 +00:00
|
|
|
</programlisting>
|
|
|
|
&example.outputs;
|
|
|
|
<screen>
|
2004-01-02 17:24:29 +00:00
|
|
|
<![CDATA[
|
|
|
|
bool(false)
|
|
|
|
bool(false)
|
|
|
|
bool(true)
|
|
|
|
]]>
|
2007-02-03 08:13:44 +00:00
|
|
|
</screen>
|
|
|
|
</example>
|
|
|
|
</para>
|
2007-06-16 01:17:14 +00:00
|
|
|
</refsect1>
|
|
|
|
|
2010-10-13 08:58:01 +00:00
|
|
|
<refsect1 role="errors">
|
|
|
|
&reftitle.errors;
|
2010-12-13 09:04:07 +00:00
|
|
|
&fs.emits.warning.on.failure;
|
2010-10-13 08:58:01 +00:00
|
|
|
</refsect1>
|
|
|
|
|
2007-06-16 01:17:14 +00:00
|
|
|
<refsect1 role="notes">
|
|
|
|
&reftitle.notes;
|
|
|
|
¬e.clearstatcache;
|
2007-02-03 08:13:44 +00:00
|
|
|
&tip.fopen-wrapper.stat;
|
2007-06-16 01:17:14 +00:00
|
|
|
</refsect1>
|
2003-02-20 17:25:13 +00:00
|
|
|
|
2007-06-16 01:17:14 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2007-02-03 08:13:44 +00:00
|
|
|
<para>
|
2007-06-16 01:17:14 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>chdir</function></member>
|
2012-01-07 23:06:29 +00:00
|
|
|
<member><function>dir</function></member>
|
2007-06-16 01:17:14 +00:00
|
|
|
<member><function>opendir</function></member>
|
|
|
|
<member><function>is_file</function></member>
|
|
|
|
<member><function>is_link</function></member>
|
|
|
|
</simplelist>
|
2007-02-03 08:13:44 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-16 01:17:14 +00:00
|
|
|
|
2007-02-03 08:13:44 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|