From 696b6d55ce98d71733baedd203f91bac3b982055 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Mon, 26 Oct 2026 07:58:32 +0100 Subject: [PATCH] [Sync-En] filesystem: local files skip the stat cache --- reference/filesystem/entities.ent | 24 +++++++++++++++++++ .../filesystem/functions/clearstatcache.xml | 15 ++++++++---- .../filesystem/functions/file-exists.xml | 4 ++-- .../filesystem/functions/is-executable.xml | 4 ++-- .../filesystem/functions/is-readable.xml | 4 ++-- .../filesystem/functions/is-writable.xml | 4 ++-- 6 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 reference/filesystem/entities.ent diff --git a/reference/filesystem/entities.ent b/reference/filesystem/entities.ent new file mode 100644 index 0000000000..9e7bedfb9b --- /dev/null +++ b/reference/filesystem/entities.ent @@ -0,0 +1,24 @@ + + + + + + + + + Para los ficheros locales, el resultado de esta función no se almacena en + la caché y el fichero se comprueba de nuevo en cada llamada. Para las rutas + que utilizan otros wrappers, el resultado se + almacena en la caché. + Consulte clearstatcache para más detalles. + + + + + diff --git a/reference/filesystem/functions/clearstatcache.xml b/reference/filesystem/functions/clearstatcache.xml index b30c6b491c..aac7942f3a 100644 --- a/reference/filesystem/functions/clearstatcache.xml +++ b/reference/filesystem/functions/clearstatcache.xml @@ -1,5 +1,5 @@ - + @@ -24,13 +24,13 @@ debe utilizar la función clearstatcache para borrar de la memoria los resultados de la última llamada a la función. - + Tenga en cuenta que PHP no guarda en caché información sobre - un fichero inexistente. Si se llama a file_exists + un fichero inexistente. Si se llama a is_file sobre un fichero que no existe, la función devolverá &false; hasta que se cree el fichero. Si se crea el fichero, la función devolverá &true; incluso si se borra el fichero. - + Esta función guarda en caché información sobre ficheros. @@ -60,6 +60,13 @@ filetype, y fileperms. + + Las funciones file_exists, + is_writable, is_readable e + is_executable solo utilizan la caché para las rutas que + emplean un wrapper distinto del sistema de ficheros local. Los ficheros + locales se comprueban directamente en cada llamada. + diff --git a/reference/filesystem/functions/file-exists.xml b/reference/filesystem/functions/file-exists.xml index 11398f4d1b..d8d7f108da 100644 --- a/reference/filesystem/functions/file-exists.xml +++ b/reference/filesystem/functions/file-exists.xml @@ -1,6 +1,6 @@ - + @@ -90,7 +90,7 @@ if (file_exists($filename)) { &reftitle.notes; - ¬e.clearstatcache; + &ext.filesystem.access-check-cache; &tip.fopen-wrapper.stat; diff --git a/reference/filesystem/functions/is-executable.xml b/reference/filesystem/functions/is-executable.xml index c783d1794e..c902c80a5e 100644 --- a/reference/filesystem/functions/is-executable.xml +++ b/reference/filesystem/functions/is-executable.xml @@ -1,5 +1,5 @@ - + @@ -74,7 +74,7 @@ if (is_executable($file)) { &reftitle.notes; - ¬e.clearstatcache; + &ext.filesystem.access-check-cache; &tip.fopen-wrapper.stat; diff --git a/reference/filesystem/functions/is-readable.xml b/reference/filesystem/functions/is-readable.xml index 4019d0474e..efcd16f45b 100644 --- a/reference/filesystem/functions/is-readable.xml +++ b/reference/filesystem/functions/is-readable.xml @@ -1,6 +1,6 @@ - + @@ -78,7 +78,7 @@ if (is_readable($filename)) { permisos que el usuario que ejecuta el servidor web (a menudo, es 'nobody', nadie). - ¬e.clearstatcache; + &ext.filesystem.access-check-cache; &tip.fopen-wrapper.stat; diff --git a/reference/filesystem/functions/is-writable.xml b/reference/filesystem/functions/is-writable.xml index 2d1ecf5f7d..80bae825d3 100644 --- a/reference/filesystem/functions/is-writable.xml +++ b/reference/filesystem/functions/is-writable.xml @@ -1,6 +1,6 @@ - + @@ -79,7 +79,7 @@ if (is_writable($filename)) { &reftitle.notes; - ¬e.clearstatcache; + &ext.filesystem.access-check-cache; &tip.fopen-wrapper.stat;