public void clearArchiveDirectory(){
  File directory=new File(getArchiveDirectory());
  if (directory.exists() && directory.isDirectory()) {
    String[] listing=directory.list();
    for (    String aListing : listing) {
      File file=new File(getArchiveDirectory(),aListing);
      file.delete();
    }
  }
  if (!directory.exists()) {
    directory.mkdirs();
  }
}

public void clearArchiveDirectory ( ) { File directory = new File ( getArchiveDirectory ( ) ) ; if ( directory . exists ( ) && directory . isDirectory ( ) ) { String [ ] listing = directory . list ( ) ; for ( String aListing : listing ) { File file = new File ( getArchiveDirectory ( ) , aListing ) ; file . delete ( ) ; } } if ( ! directory . exists ( ) ) { directory . mkdirs ( ) ; } }
clears the archive directory .
