darcs-2.4.4: a distributed, interactive, smart revision control system

Darcs.Patch.FileName

Description

FileName is an abstract type intended to facilitate the input and output of unicode filenames.

Synopsis

Documentation

encode_white :: FilePath -> StringSource

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.

 encode_white "hello there" == "hello\32there"
 encode_white "hello\there" == "hello\\there"

decode_white :: String -> FilePathSource

decode_white interprets the Darcs-specific "encoded" filenames produced by encode_white

 decode_white "hello\32there" == "hello there"
 decode_white "hello\\there"  == "hello\there"
 decode_white "hello\there"   == error "malformed filename"

breakup :: String -> [String]Source

Split a file path at the slashes