Add hiddenFile function

This commit is contained in:
2016-04-10 21:50:52 +02:00
parent 148eeb619f
commit c570505297

View File

@@ -72,6 +72,8 @@ module HPath
,stripPrefix
,takeDirectory
,userStringToFP
-- * ByteString Query functions
,hiddenFile
-- * Queries
,hasDot
,hasDoublePS
@@ -309,6 +311,15 @@ basename (MkPath 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