pathlib-0.1: A library for safe (file)path manipulationSource codeContentsIndex
Data.Path
Synopsis
module Data.Path.Implementation
type Absolute = Path Platform Absolute Any
type Relative = Path Platform Relative Any
type SubPath = Path Platform Sub Any
type Path absrel = Path Platform absrel Any
class PathType Platform x => AbsRel x
(</>) :: PathType Platform absrel => Path Platform absrel Any -> Name -> Path Platform absrel Any
pathSeparators :: [Char]
directory :: (PathType Platform absrel, SuffixClass absrel, RelativeW (Suffix absrel), PathType Platform (Suffix absrel)) => Path Platform absrel Any -> Split ByteString (Path Platform (Suffix absrel) Any)
file :: AbsRel absrel => Path absrel -> Split (Path absrel) ByteString
relative :: Relative
parent :: AbsRel absrel => Path absrel -> Path absrel
absolute :: Absolute
relativeTo :: AbsRel absrel => Path absrel -> Path absrel -> Maybe Relative
asRelative :: (AbsRel absrel, RelativeW absrel) => Path absrel -> Relative
eitherPath :: String -> Either Absolute Relative
currentDir :: Relative
parents :: (AbsRel abs, AbsoluteW abs) => Path abs -> [Path abs]
makeAbsolute :: AbsRel absrel => Absolute -> Path absrel -> Absolute
Documentation
module Data.Path.Implementation
type Absolute = Path Platform Absolute AnySource
type Relative = Path Platform Relative AnySource
type SubPath = Path Platform Sub AnySource
The type of relative paths with no leading "..".
type Path absrel = Path Platform absrel AnySource
class PathType Platform x => AbsRel x Source
(</>) :: PathType Platform absrel => Path Platform absrel Any -> Name -> Path Platform absrel AnySource
pathSeparators :: [Char]Source
directory :: (PathType Platform absrel, SuffixClass absrel, RelativeW (Suffix absrel), PathType Platform (Suffix absrel)) => Path Platform absrel Any -> Split ByteString (Path Platform (Suffix absrel) Any)Source
file :: AbsRel absrel => Path absrel -> Split (Path absrel) ByteStringSource
relative :: RelativeSource
parent :: AbsRel absrel => Path absrel -> Path absrelSource
absolute :: AbsoluteSource
relativeTo :: AbsRel absrel => Path absrel -> Path absrel -> Maybe RelativeSource
asRelative :: (AbsRel absrel, RelativeW absrel) => Path absrel -> RelativeSource
eitherPath :: String -> Either Absolute RelativeSource
Parse a path, resulting in either an absolute or a relative path, depending on the passed string. Every string represents either an absolute or a relative path on POSIX. (TODO This is however not the case on Windows. It may be more appropriate to make this Maybe (Either ...) but that looks a bit overdoing it.)
currentDir :: RelativeSource
parents :: (AbsRel abs, AbsoluteW abs) => Path abs -> [Path abs]Source
makeAbsolute :: AbsRel absrel => Absolute -> Path absrel -> AbsoluteSource
Produced by Haddock version 2.6.0