Xref: utzoo comp.sys.amiga.tech:7568 comp.sys.amiga:41586 Path: utzoo!utgpu!watmath!watdragon!rose!ccplumb From: ccplumb@rose.waterloo.edu (Colin Plumb) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: More dos questions Keywords: dos,sod,dso,osd Message-ID: <17200@watdragon.waterloo.edu> Date: 13 Oct 89 17:15:51 GMT References: <5599@ucdavis.ucdavis.edu> Sender: daemon@watdragon.waterloo.edu Reply-To: ccplumb@rose.waterloo.edu (Colin Plumb) Organization: U. of Waterloo, Ontario Lines: 18 In article <5599@ucdavis.ucdavis.edu> rogers@iris.ucdavis.edu (Brewski Rogers) writes: >1. How exactly is Seek() implemented? If I Seek 200K forward, will dos >read through all the data until it gets there, or does it have some way of >figuring out where to move the head to? If it does have a way of knowing >where to move the head to, is the information easily found, or does it >have to move the head to find it? In the current FS's, a file header block contains pointers to the first 72 data blocks in a file, and a pointer to an extension block, which holds another 72 pointers and another next pointer. So you have to follow the chain of extension blocks until you find the correct one, then you have all the pointers at your disposal. If you Seek() forward, you can start from the "current" extension block, but if you go backwards, you have to go back to the start and scan forwards again. -- -Colin