protected function isInaccessible($directory) {
        $isWin = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
        $folderInaccessible = ($isWin) ? !is_writable($directory) : ( !is_writable($directory) && !is_executable($directory) );
        return $folderInaccessible;
    }
protected function isInaccessible($directory) {
        $isWin = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
        $folderInaccessible = ($isWin) ? !is_writable($directory) : ( !is_writable($directory) && !is_executable($directory) );
        return $folderInaccessible;
    }
protected function isInaccessible ( $ directory ) { $ isWin = ( strtoupper ( substr ( PHP_OS , 0 , 3 ) ) === 'WIN' ) ; $ folderInaccessible = ( $ isWin ) ? ! is_writable ( $ directory ) : ( ! is_writable ( $ directory ) && ! is_executable ( $ directory ) ) ; return $ folderInaccessible ; }
Determines whether a directory can be accessed.

is_writable() is not reliable on Windows
(http://www.php.net/manual/en/function.is-executable.php#111146)
The following tests if the current OS is Windows and if so, merely
checks if the folder is writable;
otherwise, it checks additionally for executable status (like before).

@param string $directory The target directory to test access
Determines whether a directory can be accessed .