public function current()
    {
        $name = $this->getPathname();

        $endletters = DIRECTORY_SEPARATOR . '.';

        if (substr($name, -2) == $endletters) {
            $name = substr($name, 0, -2);
        }

        $file = new \SplFileInfo($name);

        return $file;
    }