private void clearCurrentDirectory(){
  File directory=new File(getCurrentDirectory());
  if (directory.exists() && directory.isDirectory()) {
    String[] listing=directory.list();
    for (    String aListing : listing) {
      File file=new File(getCurrentDirectory(),aListing);
      boolean deleted=file.delete();
    }
  }
  if (!directory.exists()) {
    directory.mkdirs();
  }
}

private void clearCurrentDirectory ( ) { File directory = new File ( getCurrentDirectory ( ) ) ; if ( directory . exists ( ) && directory . isDirectory ( ) ) { String [ ] listing = directory . list ( ) ; for ( String aListing : listing ) { File file = new File ( getCurrentDirectory ( ) , aListing ) ; boolean deleted = file . delete ( ) ; } } if ( ! directory . exists ( ) ) { directory . mkdirs ( ) ; } }
clears the archive directory .
