title: check if user-entered filename/path is valid
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/468789/is-there-a-way-in-java-to-determine-if-a-path-is-valid-without-attempting-to-crea">Is there a way in Java to determine if a path is valid without attempting to create a file?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to let the user enter the path where he wants something to be saved.
  so basically i open an editor, and let him enter the path...</p>
  
  <p>but how can i check if the entered string is a valid path?</p>
  
  <p>if the user forgets to type in a "/" at the end - its not a problem, i can manually check for that...</p>
  
  <p>but i cant manually check for everything:</p>
  
  <p>a space at the end (/folder /)</p>
  
  <p>question marks.</p>
  
  <p>greater than - less than symbols (/folder:->/</p>
  
  <p>(back)slashes \folder\</p>
  
  <p>and all that stuff</p>
  
  <p>is there a convenient way in java to check for that?</p>