I understand that writing to tape (say floppy) drives using plain C (say the openf statement and subsequent standard C file-write functions) is fundamentally different than writing to regular hard drives. I understand that I have to be careful about what block sizes I use, etc. Can some C veteran confirm that I am right? If I'm right, some further info would be appreciated, such as how I determine the right block size at run-time, etc.
And for Objective-C programmers: Do the Foundation classes to write files abstract away such details in that I can just stop worrying about what kind of a physical media I'm writing to? I.e., do the, say, NSFileManager methods support tape drives without me having to worry about anything?
Note: I am writing a modern Mac app. However, even though tape drives are rare these days (right?), it seems imprudent to just assume them away. Agreed? If this is the case, and Foundation abstracts such details away (which I hope it does), I should much rather prefer Foundation over plain C, right?
openf? What OS is this? I always just used open, read, write, and close for writing to tape for the most part. I think there's some ioctl commands to do seeks, and they take a while, but that was it.
As for floppies, they have always just looked like small volumes without a partition map. vfat was the usual Linux volume type, IIRC. Nothing special about accessing them.
P.S. I can honestly say that, unless you need a tape drive, you can assume them away at this point. I got rid of my last one years ago, and at work the sysadmin only uses a few specialized programs (tar, mt, etc.) with them, and it's all scripted. Nobody uses tapes as secondary storage these days.
Further, I use hard drives, a la Time Machine, as backups these days. They are far faster and more cost effective.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With