Trouble deleting directory, Java
<p>In my <code>jUnit</code>, i have a following snippet:</p>

<pre><code>private String  session = "/tmp/session/";
private File    f;

@Before
public void setUp() {
    f = new File(session);
    f.mkdir();
}

@After
public void tearDown() {
    System.out.println("Directory deleted:   " + f.delete()); // always false
}
</code></pre>

<p>Meanwhile:</p>

<ul>
<li>Directory permissions are ok (<code>drwxr-xr-x</code>)</li>
<li>Directory contains some files (<code>-rw-r--r--</code>)</li>
<li>No ownership issues (Creator user deletes)</li>
</ul>

<p>What would cause for <code>f.delete()</code> to fail? Is <code>f.delete()</code> an equivalent of <code>rm -rf</code> ?</p>
