protected _isPathUsable ( string $path ) : boolean | ||
$path | string | Path to folder |
Результат | boolean | true if it exists and is writable, false otherwise |
protected function _isPathUsable($path)
{
if (!is_dir($path)) {
mkdir($path, 0770, true);
}
return is_dir($path) && is_writable($path);
}