CFile::pathInfo PHP Method

pathInfo() private method

Detects filesystem object type (file, directory).
private pathInfo ( )
    private function pathInfo()
    {
        if (is_file($this->_realpath)) {
            $this->_is_file = True;
        } elseif (is_dir($this->_realpath)) {
            $this->_is_dir = True;
        }
        if ($this->_uploaded_inst) {
            $this->_is_uploaded = True;
        }
        $pathinfo = pathinfo($this->_is_uploaded ? $this->_uploaded_inst->getName() : $this->_realpath);
        $this->_dirname = $pathinfo['dirname'];
        $this->_basename = $pathinfo['basename'];
        // PHP version < 5.2 workaround
        if (!isset($pathinfo['filename'])) {
            $this->_filename = substr($pathinfo['basename'], 0, strrpos($pathinfo['basename'], '.'));
        } else {
            $this->_filename = $pathinfo['filename'];
        }
        if (array_key_exists('extension', $pathinfo)) {
            $this->_extension = $pathinfo['extension'];
        } else {
            $this->_extension = null;
        }
    }