Closed
Description
Would be nice to add a method to this API here
https://api.symfony.com/3.1/Symfony/Component/Finder/SplFileInfo.html
like:
public function getFilenameWithoutExtension() { // or whatever function name makes sense
return $this->getBasename('.' . $this->getExtension());
}
Right now the situation is so that if you pass no argument to getBasename
you get the same result as getFilename
. Which in my opinion is a mistake in SPL because when you look at pathinfo
you can see that filename
doesn't include the extension