       -> 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)
   }



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

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



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