MultiVelocity.hs · 564 B · ext
.hs · seen 60× in SWHvia fallback
swh:1:cnt:4b0617101f8cb3b1a30d8b37b780286b7ef38308;origin=https://github.com/oswald2/DGPatchMaker;anchor=swh:1:rev:d3de65d0031d01766adcce2d107ddea296b2f861;path=/src/Data/MultiVelocity.hs
Show source
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
module Data.MultiVelocity
where
import System.FilePath
import Data.Text as T
getFiles :: FilePath -> IO (Either Text [FilePath])
getFiles path =
if doesDirectoryExist path
then do
cont' <- getDirectoryContents
let cont = filter (not elem [".", ".."]) cont'
return (Right cont)
else do
return (Left (pack path T.++ " is not a directory"))
getVelocity :: FilePath -> Int
getVelocity file = 0
where
filename = takeFileName file