concrete/src/File/Service/File.php
public function replaceExtension($filename, $extension)
    {
        $parts = $this->splitFilename($filename);
        $newFilename = $parts[0] . $parts[1];
        if (is_string($extension) && ($extension !== '')) {
            $newFilename .= '.' . $extension;
        }

        return $newFilename;
    }
public function replaceExtension($filename, $extension)
    {
        $parts = $this->splitFilename($filename);
        $newFilename = $parts[0] . $parts[1];
        if (is_string($extension) && ($extension !== '')) {
            $newFilename .= '.' . $extension;
        }

        return $newFilename;
    }
public function replaceExtension ( $ filename , $ extension ) { $ parts = $ this -> splitFilename ( $ filename ) ; $ newFilename = $ parts [ 0 ] . $ parts [ 1 ] ; if ( is_string ( $ extension ) && ( $ extension !== '' ) ) { $ newFilename .= '.' . $ extension ; } return $ newFilename ; }
Takes a path and replaces the files extension in that path with the specified extension.

@param string $filename
@param string $extension

@return string
Takes a path and replaces the files extension in that path with the specified extension .