Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions reference/filesystem/entities.ent
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: KentarouTakeda Status: ready -->
<!--
See `manual.xml` for XML namespaces defaults.
Keep the lines under 79 columns, to make the process of manual
translation easier, and to avoid wrap-around in some other contexts.
-->
<entities xmlns = "http://docbook.org/ns/docbook"
xmlns:xlink = "http://www.w3.org/1999/xlink"
translate = "yes">

<entity name="ext.filesystem.access-check-cache">
<note>
<simpara>
ローカルファイルの場合、この関数の結果はキャッシュされず、
呼び出すたびにファイルを調べ直します。
他の<link linkend="wrappers">ラッパー</link>を使うパスの場合は、
結果がキャッシュされます。
詳細は、<function>clearstatcache</function> を参照してください。
</simpara>
</note>
</entity>

</entities>
14 changes: 10 additions & 4 deletions reference/filesystem/functions/clearstatcache.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: e82ff8a846af03b863c4a57fbedc0a93af0e68db Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.clearstatcache" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -26,14 +26,14 @@
このようなケースでは、<function>clearstatcache</function>を使用することで
ファイルの情報に関してPHPが持っているキャッシュをクリアすることができます。
</para>
<para>
<simpara>
PHP は存在しないファイルについての情報はキャッシュしないことにも
注意してください。もし存在しないファイルに対して
<function>file_exists</function> をコールする場合、ファイルを作成するまで
<function>is_file</function> をコールする場合、ファイルを作成するまで
この関数は &false; を返します。もしファイルを作成した場合、
たとえファイルを削除したとしても &true; を返します。
しかし、<function>unlink</function> はキャッシュを自動的にクリアします。
</para>
</simpara>
<note>
<para>
この関数は特定のファイルに関する情報をキャッシュします。したがって、
Expand Down Expand Up @@ -63,6 +63,12 @@
<function>filetype</function>, および
<function>fileperms</function>.
</para>
<simpara>
<function>file_exists</function>、<function>is_writable</function>、
<function>is_readable</function>、<function>is_executable</function>
は、ローカルファイルシステム以外のラッパーを使うパスに対してだけキャッシュを使います。
ローカルファイルは毎回直接調べます。
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand Down
4 changes: 2 additions & 2 deletions reference/filesystem/functions/file-exists.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 871a231f4a1caa5fb258ae53b1bb7d1fb2a0f949 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.file-exists">
<refnamediv>
Expand Down Expand Up @@ -90,7 +90,7 @@ if (file_exists($filename)) {

<refsect1 role="notes">
&reftitle.notes;
&note.clearstatcache;
&ext.filesystem.access-check-cache;
&tip.fopen-wrapper.stat;
</refsect1>

Expand Down
4 changes: 2 additions & 2 deletions reference/filesystem/functions/is-executable.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8d8cd43bfcd67415f3d548b7209c5b1a63d88fd1 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-executable">
<refnamediv>
Expand Down Expand Up @@ -77,7 +77,7 @@ if (is_executable($file)) {

<refsect1 role="notes">
&reftitle.notes;
&note.clearstatcache;
&ext.filesystem.access-check-cache;
&tip.fopen-wrapper.stat;
<note>
<simpara>
Expand Down
4 changes: 2 additions & 2 deletions reference/filesystem/functions/is-readable.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 871a231f4a1caa5fb258ae53b1bb7d1fb2a0f949 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-readable">
<refnamediv>
Expand Down Expand Up @@ -77,7 +77,7 @@ if (is_readable($filename)) {
PHP は、Web サーバーを実行しているユーザー ID (たいていは 'nobody')
でファイルにアクセスすることを覚えておいてください。
</para>
&note.clearstatcache;
&ext.filesystem.access-check-cache;
&tip.fopen-wrapper.stat;
<note>
<para>
Expand Down
4 changes: 2 additions & 2 deletions reference/filesystem/functions/is-writable.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: fccc7eb7010120c17732c57f93df1f321245376c Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a641e6b538290c138828651ac2a8713eb79c5389 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-writable">
<refnamediv>
Expand Down Expand Up @@ -78,7 +78,7 @@ if (is_writable($filename)) {
<refsect1 role="notes">
&reftitle.notes;

&note.clearstatcache;
&ext.filesystem.access-check-cache;
&tip.fopen-wrapper.stat;
</refsect1>

Expand Down
9 changes: 1 addition & 8 deletions reference/filesystem/functions/link.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 46a0d3708e3c428ad8fa2e1dd38e4755863dc5c2 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: 24563376cc172cdb0835373a048f570351f3c05f Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.link">
<refnamediv>
Expand Down Expand Up @@ -82,13 +82,6 @@ link($target, $link);
<refsect1 role="notes">
&reftitle.notes;
&note.no-remote;
<note>
<simpara>
Windows のみ: この関数を使用するには、
権限を昇格させたモード、あるいは UAC を無効にした状態で PHP を実行しなければなりません。
</simpara>
</note>

</refsect1>

<refsect1 role="seealso">
Expand Down
Loading