<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Path on rustbites</title><link>https://www.rustbites.com/tags/path/</link><description>Recent content in Path on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 03 May 2026 09:47:10 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/path/index.xml" rel="self" type="application/rss+xml"/><item><title>116. Path::file_prefix — Get the Real Stem of archive.tar.gz</title><link>https://www.rustbites.com/posts/bite-116/</link><pubDate>Sun, 03 May 2026 08:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-116/</guid><description>&lt;p&gt;&lt;code&gt;Path::file_stem&lt;/code&gt; strips the &lt;em&gt;last&lt;/em&gt; extension, so &lt;code&gt;archive.tar.gz&lt;/code&gt; comes back as &lt;code&gt;archive.tar&lt;/code&gt;. That&amp;rsquo;s almost never what you want for double-extension files. &lt;code&gt;file_prefix&lt;/code&gt; strips from the &lt;em&gt;first&lt;/em&gt; dot instead — &lt;code&gt;archive&lt;/code&gt;, finally.&lt;/p&gt;</description></item></channel></rss>