1{-# LANGUAGE FlexibleContexts #-}
3module Streamly.Examples.ListDirRecursive where
5import Path.IO (listDir, getCurrentDir)
6import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
9listDirRecursive :: IO ()
11 liftIO $ hSetBuffering stdout LineBuffering
12 runStreamT $ getCurrentDir >>= readdir
14 (ds, fs) <- lift $ listDir d
15 liftIO $ mapM_ putStrLn $ map show fs ++ map show ds
16 --foldWith (<>) $ map readdir ds -- serial
17 --foldWith (<=>) $ map readdir ds -- serial interleaved
18 foldWith (<|) $ map readdir ds -- concurrent left biased
19 --foldWith (<|>) $ map readdir ds -- concurrent interleaved
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list