x13a / libproc-swift

Swift wrapper for proc library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libproc-swift

Swift wrapper for proc library.

Example

import Darwin
import Proc

func main() throws {

    // To get pid path:
    let path = try Proc.pidPath(getpid()).get()
    print(path)
    
    // To list all pids:
    let pids = try Proc.listAllPids().get()
    print(pids)
    
    // To get `proc_bsdinfo`:
    let info = try Proc.pidInfo(proc_bsdinfo.self, getpid(), 0).get()
    print(info)
}

main()

About

Swift wrapper for proc library

License:MIT License


Languages

Language:Swift 99.9%Language:C 0.1%