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
1 changed files with 7 additions and 0 deletions

View File

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