Ip\Internal\Design\Helper::getFirstDir PHP Method

getFirstDir() public method

public getFirstDir ( $path )
    public function getFirstDir($path)
    {
        $files = scandir($path);
        if (!$files) {
            return false;
        }
        foreach ($files as $file) {
            if ($file != '.' && $file != '..' && is_dir($path . '/' . $file)) {
                return $file;
            }
        }
    }