README
hdi-mac
Package for handling hard disk images on macOS
Overview
A simple hdiutil wrapper for handling hard disk images in macOS.
Only those features required to work with shockpkg packages are implemented.
Currently mounting and ejecting disk images is supported.
Fully wrapping all available hdiutil features is out of scope for this project.
Only functions on macOS, as it depends on the macOS hdiutil, but safe to import or require on all platforms.
Usage
Basic Usage
import {Mounter} from '@shockpkg/hdi-mac';
async function main() {
const mounter = new Mounter();
const {devices, eject} = await mounter.attach('path/to/diskimage.dmg');
console.log(devices);
await eject();
}
main().catch(err => {
process.exitCode = 1;
console.error(err);
});
Bugs
If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.
License
Copyright (c) 2019-2021 JrMasterModelBuilder
Licensed under the Mozilla Public License, v. 2.0.
If this license does not work for you, feel free to contact me.