A 12-year-old boy accused of raping a six-year-old girl has been allowed an adjustment to his bail conditions so he can go on a family holiday.

The boy is one of two 12-year-old boys charged with allegedly assaulting and raping the young girl in a toilet block at their primary school in Sydney, Australia.

According to court documents the girl was allegedly attacked between 24 June and 16 August this year. They also state the alleged rapes and assaults took place between 8am and 4pm, the Sydney Morning Herald reports.

The boy is accused of raping the girl twice in separate attacks and is further accused of indecently assaulting her three further times with the other 12-year-old boy.

The boys were arrested at Chatswood Police Station on 30 August and suspended from school when police were alerted by the girl’s parents to the incident after it took place.

The boy has been charged with three counts of aggravated indecency in company, two counts of sexual intercourse with a child under the age of 10 and one count of indecent assault.

On Thursday, the boy’s defence lawyer James Viney pleaded not guilty to the charges on his behalf as the boy made his first appearance in the Children’s Court.

Mr Viney also applied to adjust the boy’s bail conditions, which stipulated he must stay with his parents at their home in northern Sydney, so he could go a week-long family holiday.

Magistrate Louise McManus granted the adjustment and ordered a brief of evidence to be served by November, The Daily Telegraph reports.

The boy was also excused from attending his next date in court.

Concern about the presence of the reporters in court was also heard by the magistrate.

Mr Viney mentioned the "delicate age" of the boy and of him encountering a “barrage of media.”

Magistrate McManus expressed concern about the impact of a large media presence and said the court tried to make the legal process as informal as possible for children.

The case has been referred to the Department of Public Prosecutions. and will next go before court on 24 November.

The second boy has also been charged with two counts of aggravated sexual assault and sexual intercourse with a child under the age of 10.