Class DiskArbitrationFunctions

java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.mac.DiskArbitrationFunctions

public final class DiskArbitrationFunctions extends ForeignFunctions
FFM bindings for DiskArbitration framework functions
  • Constructor Details

    • DiskArbitrationFunctions

      public DiskArbitrationFunctions()
  • Method Details

    • DASessionCreate

      public static MemorySegment DASessionCreate(MemorySegment allocator)
      Creates a new session.
      Parameters:
      allocator - The allocator to use, or NULL for the default allocator
      Returns:
      A reference to a new DASession
    • DADiskCreateFromBSDName

      public static MemorySegment DADiskCreateFromBSDName(MemorySegment allocator, MemorySegment session, MemorySegment bsdName)
      Creates a new disk object from a BSD device name.
      Parameters:
      allocator - The allocator to use, or NULL for the default allocator
      session - The DASession in which to contact Disk Arbitration
      bsdName - The BSD device name
      Returns:
      A reference to a new DADisk
    • DADiskCreateFromIOMedia

      public static MemorySegment DADiskCreateFromIOMedia(MemorySegment allocator, MemorySegment session, MemorySegment media)
      Creates a new disk object from an IOMedia object.
      Parameters:
      allocator - The allocator to use, or NULL for the default allocator
      session - The DASession in which to contact Disk Arbitration
      media - The IOMedia object
      Returns:
      A reference to a new DADisk
    • DADiskCopyDescription

      public static MemorySegment DADiskCopyDescription(MemorySegment disk)
      Obtains the Disk Arbitration description of the specified disk.
      Parameters:
      disk - The DADisk for which to obtain the description
      Returns:
      The disk's Disk Arbitration description
    • DADiskGetBSDName

      public static MemorySegment DADiskGetBSDName(MemorySegment disk)
      Obtains the BSD device name for the specified disk.
      Parameters:
      disk - The DADisk for which to obtain the BSD device name
      Returns:
      The disk's BSD device name as a C string pointer