Android: How do I get file's last modification date?
<p>The application need write file's last modification date.</p>

<pre><code> void Dater(String DateFile) {
          File file = new File(DateFile);
          if(file.exists()){
              Long lastModified = file.lastModified();
              Date date = new Date(lastModified);
              textView2.setText(String.valueOf(date));
          }
      }
</code></pre>

<p>But textView2 is empty. 
The file is ok (I open it).</p>

<pre><code>Dater("n" + String.valueOf(itemname)+".txt");
</code></pre>
