protected function find($paths, $file, $isGlob = false)
    {
        $paths = (array)$paths;
        $file = ltrim($file, "\\/");

        foreach ($paths as $path) {
            $fullPath = $this->clean($path . '/' . $file);

            if ($isGlob) {
                $paths = glob($fullPath, GLOB_BRACE);
                $paths = array_filter((array)$paths);
                return $paths ?: [];
            }

            if (file_exists($fullPath) || is_dir($fullPath)) {
                return $fullPath;
            }
        }

        return null;
    }
protected function find($paths, $file, $isGlob = false)
    {
        $paths = (array)$paths;
        $file = ltrim($file, "\\/");

        foreach ($paths as $path) {
            $fullPath = $this->clean($path . '/' . $file);

            if ($isGlob) {
                $paths = glob($fullPath, GLOB_BRACE);
                $paths = array_filter((array)$paths);
                return $paths ?: [];
            }

            if (file_exists($fullPath) || is_dir($fullPath)) {
                return $fullPath;
            }
        }

        return null;
    }
protected function find ( $ paths , $ file , $ isGlob = false ) { $ paths = ( array ) $ paths ; $ file = ltrim ( $ file , "\\/" ) ; foreach ( $ paths as $ path ) { $ fullPath = $ this -> clean ( $ path . '/' . $ file ) ; if ( $ isGlob ) { $ paths = glob ( $ fullPath , GLOB_BRACE ) ; $ paths = array_filter ( ( array ) $ paths ) ; return $ paths ? : [ ] ; } if ( file_exists ( $ fullPath ) || is_dir ( $ fullPath ) ) { return $ fullPath ; } } return null ; }
Find actual file or directory in the paths.

@param string|array $paths
@param string       $file
@param bool         $isGlob
@return null|string|array
Find actual file or directory in the paths .