title: Why Java.io.File has a restriction to delete a non-empty directory?
body: <p>According to this <code>Java</code> <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html#delete%28%29" rel="nofollow">Doc</a> <code>java.io.File</code> <code>delete()</code> method has a restriction to delete non-empty directory. (But there is a bunch of workarounds for that).</p>
  
  <p>On the other hand <code>Python</code> runs in its own virtual machine (analogue of <code>JVM</code>) called <code>Interpreter</code>. And it has a method to delete such directories</p>
  
  <p>By the way, it's possible to create infinitely recursive directory structures (in both <a href="http://blogs.msdn.com/b/oldnewthing/archive/2004/12/27/332704.aspx" rel="nofollow">Windows</a> and Linux (with symbolic links)), what will cause a loop. But, I guess, it's not the main reason, why there is an exception. </p>
  
  <p>So, why <code>java.io.File</code> has a restriction to delete a non-empty directory?</p>
  
  <p><strong>Edit</strong>: why there is no layer between low level system call like "rm -rf" and <code>Java</code> code?</p>
  
  <p><strong>Edit:</strong> the question is NOT <strong>how</strong>, but <strong>why</strong></p>