public function find($directory)
    {
        if (($path = $this->isConfig('./textpattern/config.php')) !== false) {
            return realpath($path);
        }

        if (!file_exists($directory) || !is_dir($directory) || !is_readable($directory)) {
            return false;
        }

        $iterator = new \RecursiveDirectoryIterator(realpath($directory));
        $iterator = new \RecursiveIteratorIterator($iterator);

        foreach ($iterator as $file) {
            if (($path = $this->isConfig($file)) !== false) {
                return $path;
            }
        }

        return false;
    }