title: How to check whether a (String) location is a valid saving path in Java?
body: <p>I am receiving a string from user which should be used as a location to save content to a file. This string should contain enough information, like a directory + file name. </p>
  
  <p>My question is, how can I check whether the provided string is a valid path to save content to a file (at least in theory)?</p>
  
  <p>It does not matter whether directories are created or not, or whether one has proper access to the location itself. I am only interested in checking the structure of the provided string.</p>
  
  <p>How should I proceed? I was thinking about creating a <code>File</code> object, then extracting its <code>URI</code>. Is there any better way?</p>