Implement equalFilePath

This commit is contained in:
Julian Ospald 2016-04-05 00:54:55 +02:00
parent 8c1bd139c0
commit 877d8c4089
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

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