| darcs | Source code | Contents | Index
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
Instances
Eq FileName
Ord FileName
Show FileName
FilePathLike FileName
FilePathOrURL FileName
fp2fn :: FilePath -> FileName | Source
fn2fp :: FileName -> FilePath | Source
fn2ps :: FileName -> ByteString | Source
ps2fn :: ByteString -> FileName | Source
niceps2fn :: ByteString -> FileName | Source
fn2niceps :: FileName -> ByteString | Source
break_on_dir :: FileName -> Maybe (FileName, FileName) | Source
norm_path :: FileName -> FileName | Source
own_name :: FileName -> FileName | Source
superName :: FileName -> FileName | Source
movedirfilename :: FileName -> FileName -> FileName -> FileName | Source
encode_white :: FilePath -> String | Source
`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 -> FilePath | Source
`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 -> FileName | Source
breakup :: String -> [String] | Source
Split a file path at the slashes
Produced by Haddock version 2.4.2