       -> UnsafeMutablePointer<FILE> {
     var op = "r"
     switch operation {
-      case .R, .Read: op = "r"
-      case .W, .Write: op = "w"
-      case .RE, .ReadWithCloexec: op = "re"
-      case .WE, .WriteWithCloexec: op = "we"
+      case .R: op = "r"
+      case .W: op = "w"
+      case .RE: op = "re"
+      case .WE: op = "we"
     }
     return Glibc.popen(command, op)
   }

      mode: UInt32 = DEFAULT_FILE_MODE) -> Int32 {
    var flags: Int32 = 0
    switch operation {
      case .R, .Read: flags = O_RDONLY
      case .W, .Write: flags = O_RDWR | O_CREAT | O_TRUNC
      case .A, .Append: flags = O_RDWR | O_CREAT | O_APPEND
    }
    flags |= O_CLOEXEC
    return open(filePath, flags: flags, mode: mode)



public enum FileOperation: Int {
  case R // Read
  case W // Write
  case A // Append
}

public enum PopenOperation: String {
  case R // Read
  case W // Write
  case RE // ReadWithCloexec
  case WE // WriteWithCloexec
}


