Cake\Shell\Task\ExtractTask::_isPathUsable PHP Method

_isPathUsable() protected method

Checks whether or not a given path is usable for writing.
protected _isPathUsable ( string $path ) : boolean
$path string Path to folder
return 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);
    }