title: Is there an idiom for adding a trailing slash to a file path?
body: <p>I have a program that takes a folder path as a command line argument. And then I concatenate that with filenames to access those files.</p>
  
  <p>For example, folder_path is "./config/"
  and then file_path would be "./config/app.conf" as shown below</p>
  
  <pre><code>stringstream ss;
  ss &lt;&lt; folder_path &lt;&lt; "app.conf";
  file_path = ss.str();
  </code></pre>
  
  <p>But this wouldn't work if folder_path doesn't contain an ending slash. It seems like a common issue, so I was wondering if there's an idiom for adding the slash at the end if it doesn't exist.</p>