It might be not expected, but this function will return true if the file does not exist yet even if the directory is read-only. Tested on PHP 5.3.0 RC 1.
I have buffering on and when I call stopBuffering() then the "failed to open stream: Permission denied" PharException will be thrown.
Phar::isWritable
(Unknown)
Phar::isWritable — Retourne TRUE si l'archive phar peut être modifiée
Description
bool Phar::isWritable
( void
)
Cette méthode retourne TRUE si phar.readonly est à 0 et que l'archive phar actuelle sur le disque n'est pas en lecture seule.
Liste de paramètres
Aucun paramètre.
Valeurs de retour
Retourne TRUE si l'archive phar peut être modifiée
Voir aussi
- Phar::canWrite() - Détermine si l'extension phar supporte la création et l'écriture des phars
- PharData::isWritable() - Vérifie si l'archive tar/zip peut être modifiée
Phar::isWritable
kristof dot coomans at telenet dot be
23-Apr-2009 01:08
23-Apr-2009 01:08
