Add hiddenFile function

This commit is contained in:
Julian Ospald 2016-04-10 21:50:52 +02:00
parent 148eeb619f
commit c570505297
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 11 additions and 0 deletions

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