     }
 
     public var pull: GPIOPull {
-        set(dir) {
+        set {
             fatalError("Unsupported parameter.")
         }
-        get{
+        get {
             fatalError("Parameter cannot be read.")
         }
     }

public class GPIO {
    public var bounceTime: TimeInterval?

    public private(set) var name: String = ""
    public private(set) var id: Int = 0
    var exported = false
    var listening = false
    var intThread: Thread?


    func writeToFile(_ path: String, value: String) {
        let fp = fopen(path, "w")
        guard fp != nil else { return }
        defer { fclose(fp) }
        var value = value
        let res = value.withUTF8 { buffer in
            return fwrite(buffer.baseAddress, buffer.count, 1, fp) - buffer.count
        }
        if res < 0 {
            if ferror(fp) != 0 {
                perror("Error while writing to file")
                abort()
            }
        }
    }

