diff --git a/src/HPath.hs b/src/HPath.hs index 5002af7..9452c70 100644 --- a/src/HPath.hs +++ b/src/HPath.hs @@ -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