public class DirectoryCleaner extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log |
Constructor and Description |
---|
DirectoryCleaner() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
String |
getDirectory() |
String |
getRetention() |
boolean |
isDeleteEmptySubdirectories() |
boolean |
isNotExistWarn() |
boolean |
isSubdirectories() |
void |
setDeleteEmptySubdirectories(boolean b)
when
true , empty subdirectories will be deleted, too |
void |
setDirectory(String directory)
directory to be cleaned up
|
void |
setNotExistWarn(boolean b)
when set
true , send warnings to logging and console about not existing directories |
void |
setRetention(String retention)
time (with suffix 'd', 'h', 'm' or 's' in milliseconds) that must have passed at least before a file will be deleted
|
void |
setSubdirectories(boolean b)
when
true , files in subdirectories will be deleted, too |
public void cleanup()
public void setDirectory(String directory)
public String getDirectory()
public void setRetention(String retention)
public String getRetention()
public void setSubdirectories(boolean b)
true
, files in subdirectories will be deleted, toopublic boolean isSubdirectories()
public void setDeleteEmptySubdirectories(boolean b)
true
, empty subdirectories will be deleted, toopublic boolean isDeleteEmptySubdirectories()
public void setNotExistWarn(boolean b)
true
, send warnings to logging and console about not existing directoriespublic boolean isNotExistWarn()
Copyright © 2023 Frank!Framework. All rights reserved.