As far as I know, there is no real-time OS could guarantee a hard real-time behaviour for reading or writing files on the disk.
I think at least when talking about real disks (external devices) it’s difficult to get useful hard real-time guarantees.
As long as the disk manufacturer doesn’t provide worst case latencies or deadlines in the data sheet you can’t determine an overall worst case deadline of a disk transaction.
That’s basically not related to the OS.
Otherwise if your deadline of a disk write of 1000 bytes is e.g. 10 minutes and the drive typically needs a few milliseconds for that, you can be pretty sure that the deadline is met, although there is no guarantee. Given you also have an appropriate RT software stack.
The point is the hard real-time requirement. For example there is brake control unit in a car which obviously must have hard real-time behavior because the brakes must be activated within a certain maximum time after pressing down the pedal.
This brake control unit also does some error or status logging to a storage media. The logging in turn doesn’t really require hard real-time behavior because it’s not crucial for the brake system that the log file is written until a fixed deadline or that every entry is written. The brakes itself must work (in time) to avoid accidents.