Core/Toolbox/IO/Classfile.php
public function exists(): bool
    {
        // convert namespace into path
        $class = str_replace('\\', '/', $this->classname);

        // append .php?
        if (strpos($class, '.php') === false) {
            $class .= '.php';
        }

        $class = $this->replaceDirectorySeperator($class);

        if (!empty($this->basedir)) {
            $class = $this->basedir .= DIRECTORY_SEPARATOR;
        }

        return file_exists($class);
    }
public function exists(): bool
    {
        // convert namespace into path
        $class = str_replace('\\', '/', $this->classname);

        // append .php?
        if (strpos($class, '.php') === false) {
            $class .= '.php';
        }

        $class = $this->replaceDirectorySeperator($class);

        if (!empty($this->basedir)) {
            $class = $this->basedir .= DIRECTORY_SEPARATOR;
        }

        return file_exists($class);
    }
Checks for existing class file of a given classname

Takes care of namespaces.

@return boolean