Code example for File

Methods: lastModified

0
    } 
 
 
    @Override 
    public boolean canDelete(final File file, final long checkTimestamp) {
        return checkTimestamp - file.lastModified() > this.maxReservedTime;
    } 
 
 
    @Override 
    public void init(final String... values) {
        if (values[0].endsWith("m")) {
            // minutes 
            final int minutes = this.getValue(values[0]);
            this.maxReservedTime = minutes * 60L * 1000L;
        } 
        else if (values[0].endsWith("s")) {
            // seconds 
            final int seconds = this.getValue(values[0]);
            this.maxReservedTime = seconds * 1000L;
        }