private static Long getUpdatedStamp ( String absPath , File file ) { String methodName = "getUpdatedStamp" ; boolean doDebug = tc . isDebugEnabled ( ) ; Long currentStamp = Long . valueOf ( file . lastModified ( ) ) ; Long newStamp ; String newStampReason = null ; synchronized ( expansionStamps ) { Long priorStamp = expansionStamps . put ( absPath , currentStamp ) ; if ( priorStamp == null ) { newStamp = currentStamp ; if ( doDebug ) { newStampReason = "First extraction; stamp [ " + currentStamp + " ]" ; } } else if ( currentStamp . longValue ( ) != priorStamp . longValue ( ) ) { newStamp = currentStamp ; if ( doDebug ) { newStampReason = "Additional extraction; old stamp [ " + priorStamp + " ] new stamp [ " + currentStamp + " ]" ; } } else { newStamp = null ; if ( doDebug ) { newStampReason = "No extraction; stamp [ " + currentStamp + " ]" ; } } } if ( doDebug ) { Tr . debug ( tc , methodName + ": " + newStampReason ) ; } return newStamp ; }
Tell if a file should be expanded by answering the updated time stamp of the file .