Catalyzes both the 5'-exonucleolytic and structure-specific endonucleolytic hydrolysis of DNA branched nucleic acid molecules and probably plays a role in viral genome replication (PubMed:9874768, PubMed:15077103, PubMed:10364212). Active on flap (branched duplex DNA containing a free single-stranded 5'-end), 5'overhangs and pseudo-Y structures (PubMed:9874768, PubMed:15077103, PubMed:10364212). The substrates require a free, single-stranded 5' end, with endonucleolytic hydrolysis occurring at the junction of double- and single-stranded DNA (PubMed:9874768). This function may be used for example to trim such branched molecules generated by Okazaki fragments synthesis during replication. Exonucleolytic cleavage in the 5'- to 3'-direction to yield nucleoside 5'-phosphates. Binds divalent metal cations, probably Mg(2+). In vitro low metal concentrations selectively stimulate the endonuclease reaction. Endonuclease activity is suggested to require only the first cation, whereas exonuclease activity is suggested to require binding of both. High pH favors the exonuclase activity whereas low pH favors the endonuclease activity. Metal ions enhance substrate binding. Inhibited by p-hydroxymercuribenzoate (PHMB). Optimum pH is 9.3 for the exonuclease activity, 5.5 for endonuclease activity. High pH favors the exonuclase activity whereas low pH favors the endonuclease activity. Expressed in the early phase of the viral replicative cycle. Three alpha-helices form a helical arch which forms a hole in the protein and through which the 5' flap of the scissile ssDNA is threaded. Truncated N-terminus.