Create a path for a registry entry.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
func IORegistryEntryGetPath(_ entry: io _registry _entry _t, _ plane: Unsafe Pointer<Int8>!, _ path: Unsafe Mutable Pointer<Int8>!) -> kern _return _t
Parameters
entry
The registry entry handle whose path to look up.
plane
The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
path
A char buffer allocated by the caller.
Return Value
IORegistryEntryGetPath will fail if the entry is not attached in the plane, or if the buffer is not large enough to contain the path.
Discussion
The path for a registry entry is copied to the caller's buffer. The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. An alias may also exist for the entry, and will be returned if available.