exodist has asked for the
wisdom of the Perl Monks concerning the following question:
I am working on a project that requires me to be able to seek to any part of a drive, then read/write. I am using sysseek, syswrite, and sysread. I have not gotten far enough to test on an actual drive and am using 1gb disk image files. It occurs to me however that the sysseek probably keeps track of it's position on the file/device as an integer, and I know that using an integer you can only address so many bytes before it overflows. I could potentially be using this on files/devices larger than 2tb. Do I need to be worried? or is the position stored in such a way that it does not matter?
Before I say why I need this I will say I know a lot of people will have opinions on weather or not they think this project is worth doing, and weather it is worth doing in perl, let me just say I am doing this, and I am doing it in perl, I respect your opinions, however I am not asking for them. I simply have a question that I need answered, the following information is so that you know the context of the question. I am sorry if this seems rude.
I am writing a distributed database driven filesystem, but it also has a local disk filesystem components. I need to use perl to directly access any given portion of a disk at any given time, I am wondering if the sysseek function is able to seek far enough.
will this work:
I figure I am probably gonna have to seek multiple times of a given quantity before reaching the desired byte. I know that if I need to address a byte that is more than an integer's maximum value away from the current position I may need to seek a couple times to reach it passing an argument less than the maximum integer value each time.