packages feed

hpath-filepath 0.10.1 → 0.10.2

raw patch · 3 files changed

+21/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ System.Posix.FilePath: isSpecialDirectoryEntry :: RawFilePath -> Bool

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for hpath-filepath +## 0.10.2 -- 2020-01-18++* Add `isSpecialDirectoryEntry`+ ## 0.10.0 -- 2020-01-04  * First version. Split from 'hpath', contains only the filepath ByteString manipulation parts.
hpath-filepath.cabal view
@@ -1,5 +1,5 @@ name:                hpath-filepath-version:             0.10.1+version:             0.10.2 synopsis:            ByteString based filepath manipulation description:         ByteString based filepath manipulation, similar to 'filepath' package. This is POSIX only. -- bug-reports:
src/System/Posix/FilePath.hs view
@@ -73,6 +73,7 @@ , isAbsolute , isValid , makeValid+, isSpecialDirectoryEntry , isFileName , hasParentDir , hiddenFile@@ -722,6 +723,21 @@ makeValid path   | BS.null path = BS.singleton _underscore   | otherwise    = BS.map (\x -> if x == _nul then _underscore else x) path+++-- | Is a FilePath valid, i.e. could you create a file like it?+--+-- >>> isSpecialDirectoryEntry "."+-- True+-- >>> isSpecialDirectoryEntry ".."+-- True+-- >>> isSpecialDirectoryEntry "/random_ path:*"+-- False+isSpecialDirectoryEntry :: RawFilePath -> Bool+isSpecialDirectoryEntry filepath+  | BS.pack [_period, _period] == filepath = True+  | BS.pack [_period] == filepath          = True+  | otherwise                              = False   -- | Is the given path a valid filename? This includes