public function isAllowedDirectory($item)
    {
        return
            is_dir($item) &&
            !ends_with($item, DIRECTORY_SEPARATOR.'.') &&
            !ends_with($item, DIRECTORY_SEPARATOR.'..');
    }
public function isAllowedDirectory($item)
    {
        return
            is_dir($item) &&
            !ends_with($item, DIRECTORY_SEPARATOR.'.') &&
            !ends_with($item, DIRECTORY_SEPARATOR.'..');
    }
public function isAllowedDirectory ( $ item ) { return is_dir ( $ item ) && ! ends_with ( $ item , DIRECTORY_SEPARATOR . '.' ) && ! ends_with ( $ item , DIRECTORY_SEPARATOR . '..' ) ; }
Check if the string is a directory.

@param $item

@return bool
Check if the string is a directory .