Class DirectoryCleaner

java.lang.Object
org.frankframework.util.DirectoryCleaner

@FrankDocGroup(OTHER) public class DirectoryCleaner extends Object
Cleans up a directory.
Author:
Peter Leeuwenburgh
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

    • DirectoryCleaner

      public DirectoryCleaner()
  • Method Details

    • cleanup

      public void cleanup()
    • setDirectory

      public void setDirectory(String directory)
      directory to be cleaned up
    • getDirectory

      public String getDirectory()
    • setRetention

      public void setRetention(String retention)
      Minimum amount of time (with suffix 'd', 'h', 'm' or 's') that must have passed before a file will be deleted. You may only use one suffix!
      Default value
      30d
    • getRetention

      public String getRetention()
    • setSubdirectories

      public void setSubdirectories(boolean b)
      when true, files in subdirectories will be deleted, too
      Default value
      false
    • isSubdirectories

      public boolean isSubdirectories()
    • setDeleteEmptySubdirectories

      public void setDeleteEmptySubdirectories(boolean b)
      when true, empty subdirectories will be deleted, too
      Default value
      false
    • isDeleteEmptySubdirectories

      public boolean isDeleteEmptySubdirectories()
    • setNotExistWarn

      public void setNotExistWarn(boolean b)
      when set true, send warnings to logging and console about not existing directories
      Default value
      true
    • isNotExistWarn

      public boolean isNotExistWarn()