Windows中的Haskell列表驱动器

rem*_*ezx 7 windows haskell

如何在Haskell中列出磁盘驱动器?我想在Windows上获取磁盘驱动器号并在Linux上获得"/".可能吗?我无处可寻.

ja.*_*ja. 4

import System.Process
c = do
  res <- readProcess "wmic" ["logicaldisk","get","caption"] ""
  --print res
  -- clean up the output
  print $ init $ map (take 2) $ drop 1(lines res)
Run Code Online (Sandbox Code Playgroud)