@TomMalbran #4379 was my pull request. You're right, getFilenameExtension could re-use _getFileExtension. Haven't noticed it. getFilenameExtension should return extension including . (See the usage). It's due to how PathUtils behaved. It has to be fixed.

On your FileEntry comment: that one I actually considered. However, getting the base name is a string operation (see the usage included in the same pull request). Creating an object each time one needs to parse a string is not a good idea.