src/Textpattern/Composer/Installer/Textpattern/Find.php
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;
    }
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;
    }
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 ; }
Finds the closest Textpattern installation path.

@param  string      The directory
@return string|bool The path, or FALSE
Finds the closest Textpattern installation path .