Structure-specific nuclease with 5'-flap endonuclease and 5'-3' exonuclease activities involved in DNA replication and repair. During DNA replication, cleaves the 5'-overhanging flap structure that is generated by displacement synthesis when DNA polymerase encounters the 5'-end of a downstream Okazaki fragment. Binds the unpaired 3'-DNA end and kinks the DNA to facilitate 5' cleavage specificity. Cleaves one nucleotide into the double-stranded DNA from the junction in flap DNA, leaving a nick for ligation. Also involved in the base excision repair (BER) pathway. Acts as a genome stabilization factor that prevents flaps from equilibrating into structures that lead to duplications and deletions. Also possesses 5'-3' exonuclease activity on nicked or gapped double-stranded DNA 