 | hashed-storage-0.3.8: Hashed file storage support code. | Contents | Index |
|
|
|
Description |
A few darcs-specific utility functions. These are used for reading and
writing darcs and darcs-compatible hashed trees.
|
|
Synopsis |
|
|
|
Documentation |
|
darcsFormatSize :: Num a => a -> ByteString |
|
darcsFormatHash :: Hash -> ByteString |
|
darcsDecodeWhite :: String -> FilePath |
decode_white interprets the Darcs-specific "encoded" filenames
produced by darcsEncodeWhite
darcsDecodeWhite "hello\32\there" == "hello there"
darcsDecodeWhite "hello\92\there" == "hello\there"
darcsDecodeWhite "hello\there" == error "malformed filename"
|
|
darcsEncodeWhite :: FilePath -> String |
encode_white translates whitespace in filenames to a darcs-specific
format (backslash followed by numerical representation according to ord).
Note that backslashes are also escaped since they are used in the encoding.
darcsEncodeWhite "hello there" == "hello\32\there"
darcsEncodeWhite "hello\there" == "hello\92\there"
|
|
darcsFormatDir :: Tree -> ByteString |
|
darcsParseDir :: ByteString -> [(ItemType, Name, Hash)] |
|
darcsTreeHash :: Tree -> Hash |
Compute a darcs-compatible hash value for a tree-like structure.
|
|
Produced by Haddock version 2.3.0 |