cvs: phpdoc-ja /reference/filesystem/functions glob.xml is-readable.xml is-uploaded-file.xml is-writable.xml link.xml linkinfo.xml mkdir.xml
move-uploaded-file.xml readfile.xml readlink.xml rename.xml rewind.xml rmdir.xml stat.xml symlink.xml tempnam.xml umask.xml

From: Date: Sat, 23 Jul 2005 08:37:28 +0000
Subject: cvs: phpdoc-ja /reference/filesystem/functions glob.xml is-readable.xml is-uploaded-file.xml is-writable.xml link.xml linkinfo.xml mkdir.xml
move-uploaded-file.xml readfile.xml readlink.xml rename.xml rewind.xml rmdir.xml stat.xml symlink.xml tempnam.xml umask.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-1050@lists.php.net to get a copy of this message
shimooka Sat Jul 23 04:37:28 2005 EDT Modified files: /phpdoc-ja/reference/filesystem/functions glob.xml is-readable.xml is-uploaded-file.xml is-writable.xml link.xml linkinfo.xml mkdir.xml move-uploaded-file.xml readfile.xml readlink.xml rename.xml rewind.xml rmdir.xml stat.xml symlink.xml tempnam.xml umask.xml Log: translation updated

http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/glob.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/filesystem/functions/glob.xml diff -u phpdoc-ja/reference/filesystem/functions/glob.xml:1.4 phpdoc-ja/reference/filesystem/functions/glob.xml:1.5 --- phpdoc-ja/reference/filesystem/functions/glob.xml:1.4 Mon Nov 22 23:45:33 2004 +++ phpdoc-ja/reference/filesystem/functions/glob.xml Sat Jul 23 04:37:24 2005 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.19 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.glob"> <refnamediv> - <refname>glob</refname> + <refname>glob</refname> <refpurpose>パターンにマッチするパス名を探す</refpurpose> </refnamediv> <refsect1> @@ -13,8 +15,10 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> - <function>glob</function>はシェルで使われるルールに基づいて - <parameter>pattern</parameter>にマッチする全てのパス名を検索します。 + <function>glob</function> 関数は glibc の glob() + 関数で使われるルールに基づいて + <parameter>pattern</parameter> にマッチする全てのパス名を検索します。 + ルールは、一般のシェルで使われるルールと似ています。 チルダの展開やパラメータ置換は行われません。 </para> <para> @@ -48,27 +52,40 @@ </listitem> <listitem> <simpara> - <constant>GLOB_BRACE</constant> - Expands {a,b,c} を 'a', 'b', - or 'c' + <constant>GLOB_BRACE</constant> - Expands {a,b,c} を 'a', 'b', + or 'c' </simpara> </listitem> <listitem> <simpara> <constant>GLOB_ONLYDIR</constant> - パターンにマッチするディレクトリのみを返します </simpara> + <note> + <simpara> + PHP 4.3.3 以前では、<constant>GLOB_ONLYDIR</constant> は + Windows や GNU C ライブラリを使用しない他のシステムでは利用 + <emphasis role="strong">できませんでした</emphasis> 。 + </simpara> + </note> + </listitem> + <listitem> + <simpara> + <constant>GLOB_ERR</constant> - (ディレクトリが読めないなどの) + 読み込みエラー時に停止します。デフォルトではエラーは無視されます。 + </simpara> + <note> + <simpara> + <constant>GLOB_ERR</constant> は PHP 5.1 で追加されました。 + </simpara> + </note> </listitem> </itemizedlist> </para> - <note> - <simpara> - <constant>GLOB_ONLYDIR</constant> はWindowsでは使用できません。 - </simpara> - </note> <para> <example> <title> - Convenient way how <function>glob</function> can replace - <function>opendir</function> and friends. + <function>glob</function> が <function>opendir</function> + と関連する関数群の代替策になるかを示す簡便な方法 </title> <programlisting role="php"> <![CDATA[ @@ -76,26 +93,29 @@ foreach (glob("*.txt") as $filename) { echo "$filename size " . filesize($filename) . "\n"; } - -/* Output will look something like: - +?> +]]> + </programlisting> + <para> + 出力は次の通りです: + </para> + <screen> +<![CDATA[ funclist.txt size 44686 funcsummary.txt size 267625 quickref.txt size 137820 - -*/ -?> ]]> - </programlisting> + </screen> </example> </para> - + &note.no-remote; - + <para> <function>opendir</function>, <function>readdir</function>, - <function>closedir</function>, <function>fnmatch</function>も参照してください。 + <function>closedir</function>, <function>fnmatch</function> + も参照してください。 </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/is-readable.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/is-readable.xml diff -u phpdoc-ja/reference/filesystem/functions/is-readable.xml:1.5 phpdoc-ja/reference/filesystem/functions/is-readable.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/is-readable.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/is-readable.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.is-readable"> <refnamediv> <refname>is_readable</refname> @@ -21,14 +23,31 @@ イルにアクセスすることを覚えておいてください。セーフモードの制限は 働きません。 </para> + <para> + <example> + <title><function>is_writable</function> の例</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'test.txt'; +if (is_readable($filename)) { + echo 'The file is readable'; +} else { + echo 'The file is not readable'; +} +?> +]]> + </programlisting> + </example> + </para> &note.clearstatcache; - &note.no-remote; + &tip.fopen-wrapper.stat; <para> - <function>is_writable</function>, - <function>file_exists</function>, + <function>is_writable</function>, + <function>file_exists</function>, <function>fgets</function>も参照してください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml diff -u phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml:1.5 phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/is-uploaded-file.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.20 --> -<!-- EN-Revision: 1.3 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.is-uploaded-file"> <refnamediv> <refname>is_uploaded_file</refname> @@ -27,6 +29,30 @@ 暴かれる可能性があるため、特に重要です。 </para> <para> + 適切に動作させるため、関数 <function>is_uploaded_file</function> + は $_FILES['userfile']['tmp_name'] のような引数を必要とします。 + アップロードされたファイルのクライアントマシン上での名前 + $_FILES['userfile']['name'] では動作しません。 + </para> + <example> + <title><function>is_uploaded_file</function> の例</title> + <programlisting role="php"> +<![CDATA[ +<?php + +if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { + echo "File ". $_FILES['userfile']['name'] ." uploaded successfully.\n"; + echo "Displaying contents\n"; + readfile($_FILES['userfile']['tmp_name']); +} else { + echo "Possible file upload attack: "; + echo "filename '". $_FILES['userfile']['tmp_name'] . "'."; +} + +?>]]> + </programlisting> + </example> + <para> <function>is_uploaded_file</function>は、 PHP 3.0.16 より後のバージョンの PHP 3 および 4.0.2 以 降のバージョンの PHP 4 でのみ利用可能です。 @@ -38,21 +64,26 @@ これはこのバージョン以降でPHPの内部処理が変更されたためです。 </para> </note> + </para> + <example> + <title>PHP 4 &lt; 4.0.3 における <function>is_uploaded_file</function> + の例</title> <programlisting role="php"> <![CDATA[ <?php -/* Userland test for uploaded file. */ -function is_uploaded_file($filename) { +/* アップロードされたファイルのテスト */ +function is_uploaded_file($filename) +{ if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam('', '')); } $tmp_file .= '/' . basename($filename); - /* User might have trailing slash in php.ini... */ + /* ユーザーは php.ini で最後にスラッシュを付けているかも知れない... */ return (ereg_replace('/+', '/', $tmp_file) == $filename); } -/* This is how to use it, since you also don't have - * move_uploaded_file() in these older versions: */ +/* 以下はこの関数の使用方法。これら古いバージョンには + * move_uploaded_file() もない。 */ if (is_uploaded_file($HTTP_POST_FILES['userfile'])) { copy($HTTP_POST_FILES['userfile'], "/place/to/put/uploaded/file"); } else { @@ -61,7 +92,7 @@ ?> ]]> </programlisting> - </para> + </example> <para> 簡単な使用例に関しては、<function>move_uploaded_file</function>お よび<link linkend="features.file-upload">ファイルアップロードの処 http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/is-writable.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/is-writable.xml diff -u phpdoc-ja/reference/filesystem/functions/is-writable.xml:1.5 phpdoc-ja/reference/filesystem/functions/is-writable.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/is-writable.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/is-writable.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.27 --> -<!-- EN-Revision: 1.2 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.is-writable"> <refnamediv> <refname>is_writable</refname> @@ -22,14 +24,31 @@ でファイルにアクセスすることを覚えておいてください。 セーフモードの制限は働きません。 </para> + <para> + <example> + <title><function>is_writable</function> の例</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'test.txt'; +if (is_writable($filename)) { + echo 'The file is writable'; +} else { + echo 'The file is not writable'; +} +?> +]]> + </programlisting> + </example> + </para> - &note.clearstatcache; - - &note.no-remote; + &note.clearstatcache; + + &tip.fopen-wrapper.stat; <para> <function>is_readable</function>, - <function>file_exists</function>, + <function>file_exists</function>, <function>fwrite</function>も参照ください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/link.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/link.xml diff -u phpdoc-ja/reference/filesystem/functions/link.xml:1.5 phpdoc-ja/reference/filesystem/functions/link.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/link.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/link.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.5 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.link"> <refnamediv> <refname>link</refname> @@ -15,11 +17,15 @@ </methodsynopsis> <para> <function>link</function>はハードリンクを作成します。 + &return.success; </para> + &note.no-remote; + &note.no-windows; + <para> シンボリックリンクを作成する<function>symlink</function>や - <function>linkinfo</function>、<function>readlink</function> + <function>linkinfo</function>、<function>readlink</function> も参照ください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/linkinfo.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/linkinfo.xml diff -u phpdoc-ja/reference/filesystem/functions/linkinfo.xml:1.5 phpdoc-ja/reference/filesystem/functions/linkinfo.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/linkinfo.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/linkinfo.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.3 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.linkinfo"> <refnamediv> <refname>linkinfo</refname> @@ -13,14 +15,31 @@ <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> - <function>linkinfo</function>は、lstatシステムコールで返された - UNIX C言語のstat構造体のst_devフィールドを返します。この関数は、 + <function>linkinfo</function>は、<literal>lstat</literal> + システムコールで返された + UNIX C言語のstat構造体の <literal>st_dev</literal> + フィールドを返します。この関数は、 (<parameter>path</parameter>が指している)リンクが実際に存在 - するかどうかを、(stat.hで定義されているS_ISLNKマクロと同じ - 方法で)チェックするために使われます。0を返し、エラーの場合に + するかどうかを、(<filename>stat.h</filename> で定義されている S_ISLNK + マクロと同じ方法で)チェックするために使われます。0を返し、エラーの場合に &false;を返します。 </para> <para> + <example> + <title><function>linkinfo</function> の例</title> + <programlisting role="php"> +<![CDATA[ +<?php + +echo linkinfo('/vmlinuz'); // 835 + +?> +]]> + </programlisting> + </example> + </para> + &note.no-windows; + <para> <function>symlink</function>, <function>link</function>, <function>readlink</function>も参照ください。 </para> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/mkdir.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-ja/reference/filesystem/functions/mkdir.xml diff -u phpdoc-ja/reference/filesystem/functions/mkdir.xml:1.8 phpdoc-ja/reference/filesystem/functions/mkdir.xml:1.9 --- phpdoc-ja/reference/filesystem/functions/mkdir.xml:1.8 Fri Apr 29 09:04:28 2005 +++ phpdoc-ja/reference/filesystem/functions/mkdir.xml Sat Jul 23 04:37:24 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.17 Maintainer: hirokawa Status: partial --> -<!-- CREDITS: elf --> +<!-- EN-Revision: 1.17 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: elf, shimooka --> <refentry id="function.mkdir"> <refnamediv> <refname>mkdir</refname> @@ -51,9 +51,10 @@ </para> <note> <simpara> - As of PHP 5.0.0 <function>mkdir</function> can also be - used with <emphasis>some</emphasis> URL wrappers. Refer to <xref linkend="wrappers"/> - for a listing of which wrappers support <function>mkdir</function>. + PHP 5.0.0 以降、<function>mkdir</function> は + <emphasis>いくつかの</emphasis> URL ラッパーを併用することが可能です。 + <function>mkdir</function> をサポートしているラッパーの一覧については、 + <xref linkend="wrappers"/> を参照ください。 </simpara> </note> &note.context-support; http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml diff -u phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml:1.6 phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml:1.7 --- phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml:1.6 Fri Apr 29 09:04:28 2005 +++ phpdoc-ja/reference/filesystem/functions/move-uploaded-file.xml Sat Jul 23 04:37:24 2005 @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.20 --> -<!-- EN-Revision: 1.3 Maintainer: hirokawa Status: partical --> -<!-- CREDITS: elf --> +<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: partical --> +<!-- CREDITS: elf, shimooka --> <refentry id="function.move-uploaded-file"> <refnamediv> <refname>move_uploaded_file</refname> @@ -40,14 +41,16 @@ </para> <note> <para> - <function>move_uploaded_file</function> is both &safemode; - and <link linkend="ini.open-basedir">open_basedir</link> - aware. However, restrictions are placed only on the - <parameter>destination</parameter> path as to allow the moving - of uploaded files in which <parameter>filename</parameter> may conflict - with such restrictions. <function>move_uploaded_file</function> ensures - the safety of this operation by allowing only those files uploaded - through PHP to be moved. + <function>move_uploaded_file</function> は &safemode; と + <link linkend="ini.open-basedir">open_basedir</link> + の両者を考慮しています。 + しかしながら、アップロードされたファイルを移動する + <parameter>destination</parameter> パスのみ制限が設けられます。 + そこでは <parameter>filename</parameter> + がそれらの制限に抵触する可能性があるためです。 + <function>move_uploaded_file</function> は PHP + を通じてアップロードされたファイルのみを移動できるようにすることで + この操作の安全性を保証しています。 </para> </note> <warning> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/readfile.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/readfile.xml diff -u phpdoc-ja/reference/filesystem/functions/readfile.xml:1.5 phpdoc-ja/reference/filesystem/functions/readfile.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/readfile.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/readfile.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.5 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.readfile"> <refnamediv> <refname>readfile</refname> @@ -29,10 +31,11 @@ のファイルの検索も行うことができます。 </para> <para> - <function>fpassthru</function>, <function>file</function>, - <function>fopen</function>, <function>include</function>, - <function>require</function>, <function>virtual</function>, - <xref linkend="wrappers"/> + <function>fpassthru</function>, + <function>file</function>, <function>fopen</function>, + <function>include</function>, <function>require</function>, + <function>virtual</function>, <function>file_get_contents</function>, + and <xref linkend="wrappers"/> も参照ください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/readlink.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/filesystem/functions/readlink.xml diff -u phpdoc-ja/reference/filesystem/functions/readlink.xml:1.4 phpdoc-ja/reference/filesystem/functions/readlink.xml:1.5 --- phpdoc-ja/reference/filesystem/functions/readlink.xml:1.4 Mon Nov 22 23:45:33 2004 +++ phpdoc-ja/reference/filesystem/functions/readlink.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.3 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.readlink"> <refnamediv> <refname>readlink</refname> @@ -17,9 +19,25 @@ シンボリックリンク・パスの内容を返します。エラーの場合0を 返します。 </para> + <para> + <example> + <title><function>readlink</function> の例</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// 出力例 /boot/vmlinux-2.4.20-xfs +echo readlink('/vmlinuz'); + +?> +]]> + </programlisting> + </example> + </para> + &note.no-windows; <para> <function>is_link</function>, - <function>symlink</function>, + <function>symlink</function>, <function>linkinfo</function>も参照してください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/rename.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/rename.xml diff -u phpdoc-ja/reference/filesystem/functions/rename.xml:1.5 phpdoc-ja/reference/filesystem/functions/rename.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/rename.xml:1.5 Mon Nov 22 23:45:34 2004 +++ phpdoc-ja/reference/filesystem/functions/rename.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.11 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.rename"> <refnamediv> <refname>rename</refname> @@ -9,9 +11,10 @@ <refsect1> <title>説明</title> <methodsynopsis> - <type>int</type><methodname>rename</methodname> + <type>bool</type><methodname>rename</methodname> <methodparam><type>string</type><parameter>oldname</parameter></methodparam> <methodparam><type>string</type><parameter>newname</parameter></methodparam> + <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> </methodsynopsis> <para> <parameter>oldname</parameter>を @@ -38,9 +41,25 @@ パーテーション越しにファイル名を変更することはできません。 </para> </note> + <note> + <simpara> + PHP 5.0.0 以降、<function>rename</function> は + <emphasis>いくつかの</emphasis> URL ラッパーを併用することが可能です。 + <function>rename</function> をサポートしているラッパーの一覧については、 + <xref linkend="wrappers"/> を参照ください。 + </simpara> + </note> + <note> + <simpara> + <parameter>oldname</parameter> で使用されるラッパーは、 + <parameter>newname</parameter> で使用するラッパーと適合 + <emphasis>している必要があります</emphasis> 。 + </simpara> + </note> + &note.context-support; <para> - <function>copy</function>, - <function>unlink</function>, + <function>copy</function>, + <function>unlink</function>, <function>move_uploaded_file</function>も参照してください。 </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/rewind.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/rewind.xml diff -u phpdoc-ja/reference/filesystem/functions/rewind.xml:1.5 phpdoc-ja/reference/filesystem/functions/rewind.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/rewind.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/rewind.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.rewind"> <refnamediv> <refname>rewind</refname> @@ -23,11 +25,11 @@ ファイルポインタは有効なものでなければならず、また <function>fopen</function>で正常にオープンされたファイルを 指している必要があります。 - </para> + </para> <note> <para> - 追記("a")モードでファイルをオープンした場合、ファイル位置によら - ずファイルに書き込まれるデータは常に追加されます。 + 追記 ("a" もしくは "a+") モードでファイルをオープンした場合、 + ファイル位置によらずファイルに書き込まれるデータは常に追加されます。 </para> </note> <para> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/rmdir.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/rmdir.xml diff -u phpdoc-ja/reference/filesystem/functions/rmdir.xml:1.5 phpdoc-ja/reference/filesystem/functions/rmdir.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/rmdir.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/rmdir.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.rmdir"> <refnamediv> <refname>rmdir</refname> @@ -18,6 +20,16 @@ 適切なパーミッションが設定されていなければなりません。 &return.success; </para> + <note> + <simpara> + PHP 5.0.0 以降、<function>rmdir</function> は + <emphasis>いくつかの</emphasis> URL ラッパーを併用することが可能です。 + <function>rmdir</function> をサポートしているラッパーの一覧については、 + <xref linkend="wrappers"/> を参照ください。 + </simpara> + </note> + &note.context-support; + &note.sm.uidcheck.dir; <para> <function>mkdir</function>,<function>unlink</function>も参照ください。 </para> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/stat.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/stat.xml diff -u phpdoc-ja/reference/filesystem/functions/stat.xml:1.5 phpdoc-ja/reference/filesystem/functions/stat.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/stat.xml:1.5 Fri Apr 29 09:04:28 2005 +++ phpdoc-ja/reference/filesystem/functions/stat.xml Sat Jul 23 04:37:24 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.stat"> <refnamediv> <refname>stat</refname> @@ -96,7 +98,7 @@ <row> <entry>10</entry> <entry>ctime</entry> - <entry>最終変更時間 (Unix タイムスタンプ)</entry> + <entry>最終 inode 変更時間 (Unix タイムスタンプ)</entry> </row> <row> <entry>11</entry> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/symlink.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/symlink.xml diff -u phpdoc-ja/reference/filesystem/functions/symlink.xml:1.5 phpdoc-ja/reference/filesystem/functions/symlink.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/symlink.xml:1.5 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/symlink.xml Sat Jul 23 04:37:25 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.2 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.symlink"> <refnamediv> <refname>symlink</refname> @@ -21,6 +23,7 @@ <para> &return.success; </para> + &note.no-windows; <para> ハードリンクを作るには<function>link</function>、そして <function>readlink</function>と<function>linkinfo</function> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/tempnam.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/filesystem/functions/tempnam.xml diff -u phpdoc-ja/reference/filesystem/functions/tempnam.xml:1.6 phpdoc-ja/reference/filesystem/functions/tempnam.xml:1.7 --- phpdoc-ja/reference/filesystem/functions/tempnam.xml:1.6 Sun Jan 2 02:23:32 2005 +++ phpdoc-ja/reference/filesystem/functions/tempnam.xml Sat Jul 23 04:37:25 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.17 --> -<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.tempnam"> <refnamediv> <refname>tempnam</refname> @@ -28,6 +30,13 @@ タを使用します。疑問がある場合は、tempnam(3)に関するシステムドキュ メントを参照ください。 </para> + <note> + <simpara> + PHP が指定されたパラメータ <parameter>dir</parameter> + にファイルを生成することができない場合、システム標準のフォールバックが + 実行されます。 + </simpara> + </note> <para> 新しいテンポラリファイル名を返し、失敗した場合には&false;を返しま す。 @@ -35,15 +44,17 @@ <title><function>tempnam</function>の例</title> <programlisting role="php"> <![CDATA[ -$tmpfname = tempnam ("/tmp", "FOO"); +<?php +$tmpfname = tempnam("/tmp", "FOO"); -$fp = fopen($tmpfname, "w"); -fwrite($fp, "writing to tempfile"); -fclose($fp); +$handle = fopen($tmpfname, "w"); +fwrite($handle, "writing to tempfile"); +fclose($handle); // ここで何か行う unlink($tmpfname); +?> ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc-ja/reference/filesystem/functions/umask.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/filesystem/functions/umask.xml diff -u phpdoc-ja/reference/filesystem/functions/umask.xml:1.5 phpdoc-ja/reference/filesystem/functions/umask.xml:1.6 --- phpdoc-ja/reference/filesystem/functions/umask.xml:1.5 Tue Apr 26 13:51:57 2005 +++ phpdoc-ja/reference/filesystem/functions/umask.xml Sat Jul 23 04:37:25 2005 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./ja/functions/filesystem.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id="function.umask"> <refnamediv> <refname>umask</refname> @@ -23,6 +25,34 @@ <function>umask</function>を引数無しで実行すると、単に現在の umask値を返します。 </para> + <note> + <para> + マルチスレッドな Web サーバでこの関数を使用することは避けてください。 + ファイルを生成後、<function>chmod</function> を使用してファイル権限を + 変更するのがより良い方法です。全て同じ umask が使用されるので、 + <function>umask</function> の使用は、スクリプトを同時に実行する場合や + Web サーバ自身の予期しない動作を引き起こす原因になる可能性があります。 + </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); + +// チェック +if ($old != umask()) { + die('An error occured while changing back the umask'); +} +?> +]]> + </programlisting> + </example> + </para> </refsect1> </refentry>
« previous php.doc.ja (#1050) next »