-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New verb: archive #52
Comments
--size 400K, 800K, 1.4M, 20M should all correspond to the exact right sizes for single-sided, double-sided, and high-density floppies and the HD 20. Idea: --size floppy generates the smallest floppy that will fit the provided contents. Any of those four sizes should work on nearly any Mac, even the stricter emulators like Clock Signal that don't implement magic floppies. Special sizes could include:
Most of these are not strictly necessary, but if impluse can check whether the contents would fit on the disk, then that check could be important for creating HFS images to be written to real media. |
Like truncate, --size should accept S as a suffix meaning “0x200-byte sector”. |
Disk Copy might be useful for getting blank examples of some of those sizes. Like, you can create a blank floppy image, and I know it has presets for certain other sizes which may correspond to Apple hard drives. |
ImpCatalogBuilder will need to gain the ability to create both HFS and HFS+ catalogs. That'll be a major shift; much of it is defined in terms of the assumption that the source is an HFS volume and the destination is an HFS+ volume. As used in It might also be that ImpCatalogBuilder needs to be able to build catalogs from inputs that are not an existing catalog. |
I think Traversing the source once is possible, but it would mean the catalog and allocations files would have to be last. Which is technically valid, but I feel like that might be problematic for performance on certain media (particularly CDs and slow HDDs). Maybe that's a non-issue, though? Many people might be using their archives in emulators or SCSI2SD-like devices. |
Been thinking about ImpHFSVolume and ImpHFSPlusVolume. Currently, one is always a source volume, and the other is always a destination volume, and the latter inherits a bunch of properties from the former. For archiving (and reverse conversion), that needs to change, as HFS volumes will become a potential destination. I'm thinking:
I'm undecided on whether ImpSourceVolume and ImpDestinationVolume should have a common parent. It would be solely for keeping a few properties DRY, so maybe not worth it. The abstract classes would provide an abstraction layer over the different types found in the volume headers and possibly the catalog and extents overflow trees. (Those are already generic.) Many of those types would need to be nullable, particularly when HFS+ has something and HFS doesn't (or vice versa, in the case of—at least—the volume header's volume name). Converters, then, would no longer work directly with volume header structures—everything would go through the properties of the volumes. There might need to be validation methods in the destination classes for range-checking: for reverse conversion or certain archiving tasks, a value might come in that can't be represented in an HFS destination. |
Everything I said about reverse conversion also applies to defragmenting (conversion to the same format, such as HFS to HFS). |
Refactoring to prepare to build #52. In particular, this refactor pulls apart source/destination from HFS/HFS+. ImpHFSVolume is now ImpHFSSourceVolume, and ImpHFSPlusVolume is now ImpHFSPlusDestinationVolume; code from the latter related to being a source has been moved to the new class ImpHFSPlusSourceVolume. Each of the specific source/destination classes is a subclass of a more generic (though still HFS-family-centric) abstract class.
Splitting this out from #8, although there will be some work in common (namely, the ability to create a new HFS volume and populate it with stuff).
archive, to my mind, should take the name of an image file to create, a volume name, and one or more paths to add to the created volume. If the
--size
option is given, paths are optional—you could create an empty volume of some size, likehdiutil create
.So, for example:
It might also be worth supporting
hdiutil create
's--srcdir/srcfolder
option to create a volume from some folder having the same name as that folder.The text was updated successfully, but these errors were encountered: