darcs-2.4.4: a distributed, interactive, smart revision control systemSource codeContentsIndex
Darcs.Patch.FileName
Description
FileName is an abstract type intended to facilitate the input and output of unicode filenames.
Synopsis
data FileName
fp2fn :: FilePath -> FileName
fn2fp :: FileName -> FilePath
fn2ps :: FileName -> ByteString
ps2fn :: ByteString -> FileName
niceps2fn :: ByteString -> FileName
fn2niceps :: FileName -> ByteString
break_on_dir :: FileName -> Maybe (FileName, FileName)
norm_path :: FileName -> FileName
own_name :: FileName -> FileName
superName :: FileName -> FileName
movedirfilename :: FileName -> FileName -> FileName -> FileName
encode_white :: FilePath -> String
decode_white :: String -> FilePath
(///) :: FileName -> FileName -> FileName
breakup :: String -> [String]
Documentation
data FileName Source
show/hide Instances
fp2fn :: FilePath -> FileNameSource
fn2fp :: FileName -> FilePathSource
fn2ps :: FileName -> ByteStringSource
ps2fn :: ByteString -> FileNameSource
niceps2fn :: ByteString -> FileNameSource
fn2niceps :: FileName -> ByteStringSource
break_on_dir :: FileName -> Maybe (FileName, FileName)Source
norm_path :: FileName -> FileNameSource
own_name :: FileName -> FileNameSource
superName :: FileName -> FileNameSource
movedirfilename :: FileName -> FileName -> FileName -> FileNameSource
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"
(///) :: FileName -> FileName -> FileNameSource
breakup :: String -> [String]Source
Split a file path at the slashes
Produced by Haddock version 2.6.1