Anonymous user
File size distribution: Difference between revisions
m
→{{header|Haskell}}: optimize file collection
(Add Factor) |
m (→{{header|Haskell}}: optimize file collection) |
||
Line 441:
import GHC.Conc (getNumProcessors)
import System.Directory (doesDirectoryExist, doesFileExist,
pathIsSymbolicLink)
import System.Environment (getArgs)
Line 562:
pure []
where
tryCollect =
where
if isFolder then
items <- mapM (\f -> File f <$> withFile f ReadMode hFileSize) files▼
else do
pure $ File p size
parallelItemCollector :: FilePath -> IO [Item]
|