open :: FileSystem -> Path -> IOMode -> IO File
open (FileSystem fs) p m =
  withCString p $ \path -> do
  f <- throwErrnoIfNull "open" $
         c_hdfs_open_file fs path iomode 0 0 0 -- note: using defaults
  return . File $ f
  where
    iomode = toHDFSIOMode m
open :: FileSystem -> Path -> IOMode -> IO File
open (FileSystem fs) p m =
  withCString p $ \path -> do
  f <- throwErrnoIfNull "open" $
         c_hdfs_open_file fs path iomode 0 0 0 -- note: using defaults
  return . File $ f
  where
    iomode = toHDFSIOMode m
open (FileSystem fs) p m =
  withCString p $ \path -> do
  f <- throwErrnoIfNull "open" $
         c_hdfs_open_file fs path iomode 0 0 0 -- note: using defaults
  return . File $ f
  where
    iomode = toHDFSIOMode m