private AbstractFile checkFileCorrectnessAndMmap(final File file) {
        if (!file.exists() || !file.getName().endsWith(this.fileType.getFileSuffix()))
            return null;
        AbstractFile abstractFile = null;
        final long fileLength = file.length();
        if (fileLength == this.fileSize) {
            abstractFile = this.logStoreFactory.newFile(this.fileType, file.getPath());
        }
        return abstractFile;
    }
Check file's correctness of name and length
@return mmap file
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/FileManager.java