Implement equalFilePath

This commit is contained in:
2016-04-05 00:54:55 +02:00
parent 8c1bd139c0
commit 877d8c4089

View File

@@ -62,6 +62,7 @@ module HPath
,dropFileName
,dropTrailingPathSeparator
,dropWhileEnd
,equalFilePath
,joinPath
,normalise
,splitDirectories
@@ -499,6 +500,12 @@ isValid filepath
| otherwise = True
equalFilePath :: ByteString -> ByteString -> Bool
equalFilePath p1 p2 = f p1 == f p2
where
f x = dropTrailingPathSeparator $ normalise x
--------------------------------------------------------------------------------
-- String based path functions