private isWritable ( string $path ) : boolean | ||
$path | string | The path to check |
Résultat | boolean |
private function isWritable($path)
{
if (!is_dir($path)) {
// Path does not exist, check parent
return $this->isWritable(dirname($path));
}
// Dir exists, check if it's writable
return is_writable($path);
}