|
clearstatcacheファイルのステータスのキャッシュをクリアする 説明
void clearstatcache(bool
$clear_realpath_cache = false, string $filename = "")
PHP は存在しないファイルについての情報はキャッシュしないことにも
注意してください。もし存在しないファイルに対して
is_file をコールする場合、ファイルを作成するまで
この関数は
影響を受ける関数を以下に示します。 stat, lstat, file_exists, is_writable, is_readable, is_executable, is_file, is_dir, is_link, filectime, fileatime, filemtime, fileinode, filegroup, fileowner, filesize, filetype, および fileperms. file_exists、is_writable、 is_readable、is_executable は、ローカルファイルシステム以外のラッパーを使うパスに対してだけキャッシュを使います。 ローカルファイルは毎回直接調べます。 パラメータ
戻り値値を返しません。 例
例1 clearstatcache の例 上の例の出力は、 たとえば以下のようになります。
Run this command in another shell:
echo " World!" >> /tmp/stat-demo-6fjvs4vir9ll2haCl4W
Before: 5
Cached: 5
Fresh: 13
|