title: Java: Partial path exists with Partial name of the file
body: <p>I would like to know if there is a way to know if the file exists if I only know the path of directory structure and partial name of the file. </p>
  
  <p>For instance, I would like to check if the following tar.gz file exists on following path:</p>
  
  <pre><code>/home/rah/data/download/lib/test@4.3-00@20120731.0.tar.gz
  </code></pre>
  
  <p>I want just my program to go on when I know the</p>
  
  <pre><code>path = /home/rah/data/download/lib/
  partial file name = test@4.3-00@20120731 
  </code></pre>
  
  <p><strong>(notice I'm missing "0.tar.gz")</strong>. Indeed I don't want to calculate 0 after date in the filename (it could be any value 0, 1, 2, 3...). </p>
  
  <p>So I want this to work: </p>
  
  <pre><code>if( filename.canRead() ) {
  //
  }
  </code></pre>
  
  <p>if file name is something like:  "test@4.3-00@20120731.<em>.tar.gz" 
  where STAR (</em>) could be any number </p>
  
  <p>how can I do so? or is this possible to check that partial path exists e.g.</p>
  
  <p>/home/rah/data/download/lib/test@4.3-00@20120731?</p>
  
  <p>Thank you.</p>