Implement equalFilePath
This commit is contained in:
parent
8c1bd139c0
commit
877d8c4089
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user