Since DMG is a container which can contain different file systems (ISO 9660 / UDF / HFS / APFS / FAT32 / NTFS), I'd recommend separating file system code to a new interface class, create a subfolder for HFS and move its code there. And add a possibility to add new file systems (APFS or ISO9660).
Since DMG is a container which can contain different file systems (ISO 9660 / UDF / HFS / APFS / FAT32 / NTFS), I'd recommend separating file system code to a new interface class, create a subfolder for HFS and move its code there. And add a possibility to add new file systems (APFS or ISO9660).