File size distribution: Difference between revisions

m
Line 512:
expand = foldr f . withStrategy (parTraversable rseq) <*>
Map.mapWithKey groupsFromGroup . Map.filter (> groupThreshold)
 
where
f :: Maybe (FGKey, FrequencyGroups) -- ^ expanded frequency group
Line 562 ⟶ 561:
pure []
where
tryCollect = (fmap (folderPath </>) <$> listDirectory folderPath) >>= mapM f
mapM (\p isFolder <-> doesDirectoryExist p >>=
where
f p = do \case True -> pure $ Folder p
False -> File p <$> withFile p ReadMode hFileSize)
isFolder <- doesDirectoryExist p
if isFolder then
pure $ Folder p
else
File p <$> withFile p ReadMode hFileSize
 
parallelItemCollector :: FilePath -> IO [Item]
Anonymous user