>Hi: > >I'm looking for some XCMDS/XFCN's to use in a script that rebuilds HFS >directories. All I've been able to find so far are, FS series >(FSOpen, FSRead, FSWrite, etc.) from Lawrence D'Oliveiro's >FileRsrcMisc package. > >I don't think these would be useful in a situation where HFS is >absent, or where the file system is damaged. if HFS is absent, wouldn't be easier to let the Finder do a high-level format? If the file system is damaged, are you sure you want to write you own "fix" routines? You'll have to look at volume bitmaps, MDBs, btrees, etc. I can understand wanting to use routines to add extra information from what Norton reports (eg with a bitmap error was that a free sector marked as in use, or the more serious complementary situation), but I doubt it's worthwhile writing a routine to fix problems - except you could implement something Norton should provide in the form of a roll-back log of fixes made to file-system. If you experiencing a lot of directory problems I think you should focus on why they're happening and eliminating the causes. >What I'm looking to do is to read/write individual sectors on a SCSI >device. Any help in directing me to my options for for 68K machines >is appreciated. some of the FS routines allow access to individual sectors, but I think that's only for a particular HFS volume. As you suggest, it's probably not a good idea using them unless you're sure they work even in the presence of a damaged directory. Access to sector in a mac volume is probably all you need, but I think you have to make direct SCSI Manager calls to access arbitrary sectors, eg the partition map, driver partitions, etc. or to interact with the SCSI drive to read device geometry, defect sector lists, etc. I've got some C code to do these, but you'd have to wrap these within XS to access from perl. An interesting and enriching experience. cheers, Danny Thomas