allNewFolders :: IO [FS.FilePath]
allNewFolders = Tur.fold (FS.fromText . Tur.lineToText <$> dirStream) F.list
  where
    dirStream =
        Tur.inproc
        -- Turtle has a find function but it was ~30 times slower than find
        -- This takes ~0.02 seconds, find takes ~0.60 on my machine
            "find"
            [Config.mailFolder, "-name", "new", "-type", "d"]
            Tur.empty

-- | Total number of files in a 'FS.FilePath'
allNewFolders :: IO [FS.FilePath]
allNewFolders = Tur.fold (FS.fromText . Tur.lineToText <$> dirStream) F.list
  where
    dirStream =
        Tur.inproc
        -- Turtle has a find function but it was ~30 times slower than find
        -- This takes ~0.02 seconds, find takes ~0.60 on my machine
            "find"
            [Config.mailFolder, "-name", "new", "-type", "d"]
            Tur.empty

-- | Total number of files in a 'FS.FilePath'
allNewFolders = Tur.fold (FS.fromText . Tur.lineToText <$> dirStream) F.list
  where
    dirStream =
        Tur.inproc
        -- Turtle has a find function but it was ~30 times slower than find
        -- This takes ~0.02 seconds, find takes ~0.60 on my machine
            "find"
            [Config.mailFolder, "-name", "new", "-type", "d"]
            Tur.empty

-- | Total number of files in a 'FS.FilePath'