Viewing a single comment thread. View all comments

idlebyte t1_je1xm20 wrote

Short Answer: There is an index.

Long Answer: The index is in a fixed location on the disk so the drive knows where to look for it every time. Then for variable width files (images, video, music, text docs) the index gives starting/stopping locations around the disk as files are rarely contiguous these days, especially since SSDs came out. The disk then knows how to translate the start/stops/inbetweens to exact (positions on platters, locations on chip) where the 0/1's are stored to then stream the file as requested.