A WIP hdiutil helper in swift language. For more information, please visit apple docs.
hdiutilis a command-line utility in macOS that allows users to manipulate disk images. It is a versatile tool included with the macOS operating system and provides a wide range of capabilities for creating, converting, mounting, unmounting, and inspecting disk images. Disk images are virtual disks that can contain file systems and data, typically having a .dmg or .iso file extension.
.package(url: "https://github.com/chocoford/hdiutil.git", branch: "main")
import hdituil
hdiutil.configure(options: .log(true))
hdiutil.create(...)
hdiutil.detach(...)try await hdiutil.create(
image: "MyDMG.dmg",
options: [
.srcFolder(...),
.volname(...),
.overwrite
]
)let attachOutput = try await hdiutil.attach(image: ..., options: [
.mountRandom("/tmp"),
.readwrite,
.verify(false),
.autoOpen(false),
.noBrowse
])
let deviceName = attachOutput.deviceNode
let mountURL = attachOutput.mountPoint- attach
- detach
- verify
- create
- convert
- burn
- makeHybrid
- compact
- info
- checksum
- chpass
- eraseKeys
- unflatten
- flatten
- fsid
- mountVol
- unmount
- imageInfo
- isencrypted
- plugins
- internetEnable
- resize
- segment
- pmap
- udifrez
- udifderez