Skip to content

shockpkg/hdi-mac

Repository files navigation

HDI Mac

Package for handling hard disk images on macOS

npm node

size downloads

main

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';

const mounter = new Mounter();
const {devices, eject} = await mounter.attach('path/to/diskimage.dmg');
console.log(devices);
await eject();

Bugs

If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.

License

Copyright (c) 2019-2024 JrMasterModelBuilder

Licensed under the Mozilla Public License, v. 2.0.

If this license does not work for you, feel free to contact me.