Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hdiutil

GitHub Twitter

A WIP hdiutil helper in swift language. For more information, please visit apple docs.

hdiutil is 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.

Installation

.package(url: "https://github.com/chocoford/hdiutil.git", branch: "main")

Usage

Basic

import hdituil

hdiutil.configure(options: .log(true))

hdiutil.create(...)
hdiutil.detach(...)

Create dmg

try await hdiutil.create(
    image: "MyDMG.dmg",
    options: [
        .srcFolder(...),
        .volname(...),
        .overwrite
    ]
)

Attach dmg

let attachOutput = try await hdiutil.attach(image: ..., options: [
    .mountRandom("/tmp"),
    .readwrite,
    .verify(false),
    .autoOpen(false),
    .noBrowse
])
let deviceName = attachOutput.deviceNode
let mountURL = attachOutput.mountPoint

Roadmap

  • 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

See Aso

About

A hdiutil helper in swift language

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages