@Override
public FileTime lastModifiedTime() {
if ( lastModifiedDate == -1L ) {
RevWalk revWalk = null;
try {
final LogCommand logCommand = fs.gitRepo().log().add( id ).setMaxCount( 1 );
if ( !gPath.isEmpty() ) {
logCommand.addPath( gPath );
}
revWalk = (RevWalk) logCommand.call();
lastModifiedDate = revWalk.iterator().next().getCommitterIdent().getWhen().getTime();
} catch ( Exception ex ) {
lastModifiedDate = 0;
} finally {
if ( revWalk != null ) {
revWalk.dispose();
}
}
}
return new FileTimeImpl( lastModifiedDate );
}
@Override
public FileTime lastAccessTime() {
return null;
}
@Override
public FileTime creationTime() {
if ( creationDate == -1L ) {
RevWalk revWalk = null;
try {
final LogCommand logCommand = fs.gitRepo().log().add( id ).setMaxCount( 1 );
if ( !gPath.isEmpty() ) {
logCommand.addPath( gPath );
}
revWalk = (RevWalk) logCommand.call();
creationDate = revWalk.iterator().next().getCommitterIdent().getWhen().getTime();
} catch ( Exception ex ) {
creationDate = 0;
} finally {
if ( revWalk != null ) {