cvs: phpdoc /en/reference/filesystem/functions umask.xml

From: Date: Wed, 01 Jun 2005 14:58:57 +0000
Subject: cvs: phpdoc /en/reference/filesystem/functions umask.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368394@lists.php.net to get a copy of this message
dams Wed Jun 1 10:58:57 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions umask.xml Log: adding example http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/umask.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/filesystem/functions/umask.xml diff -u phpdoc/en/reference/filesystem/functions/umask.xml:1.8 phpdoc/en/reference/filesystem/functions/umask.xml:1.9 --- phpdoc/en/reference/filesystem/functions/umask.xml:1.8 Sun May 29 06:31:07 2005 +++ phpdoc/en/reference/filesystem/functions/umask.xml Wed Jun 1 10:58:57 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.umask"> <refnamediv> @@ -31,6 +31,25 @@ itself because they all use the same umask. </para> </note> + <para> + <example> + <title><function>umask</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$old = umask(0); +chmod("/path/some_dir/some_file.txt", 0755); +umask($old); + +// Checking +if ($old != umask()) { + die('An error occured while changing back the umask'); +} +?> +]]> + </programlisting> + </example> + </para> </refsect1> </refentry>

« previous php.doc (#969368394) next »