code: private static void deleteDirectoryContents(File directory)
          throws IOException {
          Preconditions.checkArgument(directory.isDirectory(),
                                      "Not a directory: %s", directory);
          // Symbolic links will have different canonical and absolute paths
          if (!directory.getCanonicalPath().equals(directory.getAbsolutePath())) {
              return;
          }
          File[] files = directory.listFiles();
          if (files == null) {
              throw new IOException("Error listing files for " + directory);
          }
          for (File file : files) {
              deleteRecursively(file);
          }
      }
docs: Cloned from guava's com.google.common.io.Files in r9.  It was later erased completely.
  <p/>
  Deletes all the files within a directory. Does not delete the
  directory itself.
  <p/>
  <p>If the file argument is a symbolic link or there is a symbolic
  link in the path leading to the directory, this method will do
  nothing. Symbolic links within the directory are not followed.
  
  @param directory the directory to delete the contents of
  @throws IllegalArgumentException if the argument is not a directory
  @throws IOException if an I/O error occurs
  @see #deleteRecursively