Prof. R K Harrison’s Intro to the OT argued, if memory serves, that written family histories were available to Moses. The C19 suggestion that Moses could neither read nor write has long been scotched by the evidence available even in those days. He might well have been a librarian in Egypt. And plenty of oral traditions existed, which Moses could, as a poet (so Saint Jerome, & Calvin) & historian, have made good use of under divine inspiration.
Possibly some redaction was done by Joshua (eg re. Moses' death), but the antiquity is well shown by [FONT="]K A Kitchen’s Reliability Of The OT (2003).[/FONT]