packages feed

posix-paths 0.1.0.0 → 0.1.1.0

raw patch · 4 files changed

+15/−8 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

benchmarks/Bench.hs view
@@ -24,6 +24,8 @@ import Criterion.Main  +-- | Based on code from 'Real World Haskell', at+-- http://book.realworldhaskell.org/read/io-case-study-a-library-for-searching-the-filesystem.html#id620419 listFilesRecursive :: FilePath -> IO [FilePath] listFilesRecursive topdir = do     names <- System.Directory.getDirectoryContents topdir@@ -54,6 +56,7 @@        return (e:es)  +-- | similar to 'listFilesRecursive, but uses RawFilePaths listFilesRecursiveBS :: RawFilePath -> IO [RawFilePath] listFilesRecursiveBS topdir = do     names <- getDirectoryContentsBS topdir
posix-paths.cabal view
@@ -1,5 +1,5 @@ name:		posix-paths-version:        0.1.0.0+version:        0.1.1.0 license:	BSD3 license-file:	LICENSE maintainer:	jwlato@gmail.com
src/System/Posix/Directory/Traversals.hs view
@@ -95,8 +95,8 @@                | typ == dtUnknown -> isDirectory <$> getFileStatus fullpath                | otherwise        -> return False         if isDir-          then act acc path >>= \acc' -> actOnDirContents fd path acc' (loop fullpath)-          else act acc path+          then act acc fullpath >>= \acc' -> actOnDirContents fd path acc' (loop fullpath)+          else act acc fullpath   actOnDirContents :: Posix.Fd -> RawFilePath -> b -> (DirType -> Posix.Fd -> RawFilePath -> b -> IO b) -> IO b
src/System/Posix/FilePath.hs view
@@ -5,6 +5,9 @@  {-# OPTIONS_GHC -Wall #-} +-- | The equivalent of "System.FilePath" on raw (byte string) file paths.+--+-- Not all functions of "System.FilePath" are implemented yet. Feel free to contribute! module System.Posix.FilePath (    pathSeparator@@ -70,11 +73,11 @@ -- >>> let _chr :: Word8 -> Char; _chr = chr . fromIntegral  --- | Path separator charactor+-- | Path separator character pathSeparator :: Word8 pathSeparator = fromIntegral $ ord '/' --- | Check if a charactor is the path separator+-- | Check if a character is the path separator -- -- prop> \n ->  (_chr n == '/') == isPathSeparator n isPathSeparator :: Word8 -> Bool@@ -84,7 +87,7 @@ searchPathSeparator :: Word8 searchPathSeparator = fromIntegral $ ord ':' --- | Check if a charactor is the search path separator+-- | Check if a character is the search path separator -- -- prop> \n -> (_chr n == ':') == isSearchPathSeparator n isSearchPathSeparator :: Word8 -> Bool@@ -94,7 +97,7 @@ extSeparator :: Word8 extSeparator = fromIntegral $ ord '.' --- | Check if a charactor is the file extension separator+-- | Check if a character is the file extension separator -- -- prop> \n -> (_chr n == '.') == isExtSeparator n isExtSeparator :: Word8 -> Bool@@ -177,6 +180,7 @@ (<.>) = addExtension  -- | Check if a 'RawFilePath' has an extension+-- -- >>> hasExtension "file" -- False --@@ -219,7 +223,7 @@ ------------------------ -- more stuff --- Split a 'RawFilePath' into (path,file).  'combine' is the inverse+-- | Split a 'RawFilePath' into (path,file).  'combine' is the inverse -- -- >>> splitFileName "path/file.txt" -- ("path/","file.txt")