Say I had a diary and wrote an entry after I was raped, which was then submitted as evidence - could the police look through the rest of my diary and see that I had an entry from 4 years ago about breaking into a house?
The entirety of the forensic process is evidence. It's scary that there are people who might think differently. It's a fundamental cornerstone of our Constitutional process.
> Say I had a diary and wrote an entry after I was raped, which was then submitted as evidence - could the police look through the rest of my diary and see that I had an entry from 4 years ago about breaking into a house?
Yes. A person accusing another person of a crime does not get to pick and choose what evidence to turn over.
If you were accused of raping someone, and there were such a diary, would you not want your defense counsel to be able to review the fifteen diary entries previous to that, planning out how to frame you for such a crime?