private int findLastCheckpointFile(final List<AbstractFile> files, final FlushStatusCheckpoint checkpoint) {
        if (checkpoint == null || checkpoint.fileName == null) {
            return 0;
        }
        for (int fileIndex = 0; fileIndex < files.size(); fileIndex++) {
            final AbstractFile file = files.get(fileIndex);
            if (StringUtil.equalsIgnoreCase(FilenameUtils.getName(file.getFilePath()), checkpoint.fileName)) {
                return fileIndex;
            }
        }
        return 0;
    }
Recover files
@return last recover offset
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/db/AbstractDB.java