Add hiddenFile function
This commit is contained in:
parent
148eeb619f
commit
c570505297
11
src/HPath.hs
11
src/HPath.hs
@ -72,6 +72,8 @@ module HPath
|
|||||||
,stripPrefix
|
,stripPrefix
|
||||||
,takeDirectory
|
,takeDirectory
|
||||||
,userStringToFP
|
,userStringToFP
|
||||||
|
-- * ByteString Query functions
|
||||||
|
,hiddenFile
|
||||||
-- * Queries
|
-- * Queries
|
||||||
,hasDot
|
,hasDot
|
||||||
,hasDoublePS
|
,hasDoublePS
|
||||||
@ -309,6 +311,15 @@ basename (MkPath l)
|
|||||||
rl = last . splitPath . dropTrailingPathSeparator $ l
|
rl = last . splitPath . dropTrailingPathSeparator $ l
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- ByteString Query functions
|
||||||
|
|
||||||
|
hiddenFile :: Path Fn -> Bool
|
||||||
|
hiddenFile (Path ".") = False
|
||||||
|
hiddenFile (Path "..") = False
|
||||||
|
hiddenFile p = "." `B.isPrefixOf` fromRel p
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- ByteString/Word8 constants
|
-- ByteString/Word8 constants
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user