src/Plugin/FileSystemPluginLocator.php
protected function searchPluginDirectories($path) {
        $pluginDirectories = array();
        if ( ($directoryHandle = opendir($path)) == true ) {
            while (($fileOrDir = readdir( $directoryHandle )) !== false) {
                if (is_dir($path. $fileOrDir ) && $fileOrDir !== '.' && $fileOrDir !=='..') {
                    $pluginDirectories[] = $path. $fileOrDir;
                }
            }
        } else {
            throw new PluginException('Invalid plugin path, check the main config.ini file');
        }
        return $pluginDirectories;
    }
protected function searchPluginDirectories($path) {
        $pluginDirectories = array();
        if ( ($directoryHandle = opendir($path)) == true ) {
            while (($fileOrDir = readdir( $directoryHandle )) !== false) {
                if (is_dir($path. $fileOrDir ) && $fileOrDir !== '.' && $fileOrDir !=='..') {
                    $pluginDirectories[] = $path. $fileOrDir;
                }
            }
        } else {
            throw new PluginException('Invalid plugin path, check the main config.ini file');
        }
        return $pluginDirectories;
    }
Given a path it give the directories.

@param string $path

@return array pluginDirectories
@throws \PluginException