Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Finder get filename without extension #30655

Copy link
Copy link
Closed
@flip111

Description

@flip111
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.