pathtype-0.8: Type-safe replacement for System.FilePath etc

Safe HaskellSafe
LanguageHaskell98

System.Path.Posix

Description

This module provides type-safe access to filepath manipulations.

Normally you would import Path (which will use the default implementation for the host platform) instead of this. However, importing this explicitly allows for manipulation of non-native paths.

Synopsis

Documentation

type Path = Path System Source #

type AbsFile = AbsFile System Source #

type RelFile = RelFile System Source #

type AbsDir = AbsDir System Source #

type RelDir = RelDir System Source #

type Abs fd = Abs System fd Source #

type Rel fd = Rel System fd Source #

type File ar = File System ar Source #

type Dir ar = Dir System ar Source #

type AbsRelDir = AbsRelDir System Source #

type AbsRel fd = AbsRel System fd Source #

type FileDir ar = FileDir System ar Source #

type AbsPath fd = AbsPath System fd Source #

type RelPath fd = RelPath System fd Source #

type FilePath ar = FilePath System ar Source #

type DirPath ar = DirPath System ar Source #

type AbsRelPath fd = AbsRelPath System fd Source #

type FileDirPath ar = FileDirPath System ar Source #

asPath :: (AbsOrRel ar, FileOrDir fd) => String -> Path ar fd Source #

Deprecated: Use maybePath, parsePath or path instead.

asRelFile :: String -> RelFile Source #

Deprecated: Use relFile instead.

asRelDir :: String -> RelDir Source #

Deprecated: Use relDir instead.

asAbsFile :: String -> AbsFile Source #

Deprecated: Use absFile instead.

asAbsDir :: String -> AbsDir Source #

Deprecated: Use absDir instead.

asRelPath :: FileOrDir fd => String -> RelPath fd Source #

Deprecated: Use relPath instead.

asAbsPath :: FileOrDir fd => String -> AbsPath fd Source #

Deprecated: Use absPath instead.

asFilePath :: AbsOrRel ar => String -> FilePath ar Source #

Deprecated: Use filePath instead.

asDirPath :: AbsOrRel ar => String -> DirPath ar Source #

Deprecated: Use dirPath instead.

path :: (AbsRel ar, FileDir fd) => String -> Path ar fd Source #

maybe :: (AbsRel ar, FileDir fd) => String -> Maybe (Path ar fd) Source #

maybePath :: (AbsRel ar, FileDir fd) => String -> Maybe (Path ar fd) Source #

Deprecated: Use Path.maybe instead.

parse :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd) Source #

parsePath :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd) Source #

Deprecated: Use Path.parse instead.

abs :: FileDir fd => String -> Abs fd Source #

rel :: FileDir fd => String -> Rel fd Source #

file :: AbsRel ar => String -> File ar Source #

dir :: AbsRel ar => String -> Dir ar Source #

toString :: (AbsRel ar, FileDir fd) => Path ar fd -> String Source #

isAbsoluteString :: String -> Bool Source #

Deprecated: Use System.FilePath.isAbsolute instead.

isRelativeString :: String -> Bool Source #

Deprecated: Use System.FilePath.isRelative instead.

equalFilePath :: String -> String -> Bool Source #

Deprecated: Use System.FilePath.equalFilePath instead.

extSeparator :: Char Source #

Part.File extension character

> Posix.extSeparator == '.'

isExtSeparator :: Char -> Bool Source #

Is the character an extension character?

> Posix.isExtSeparator a == (a == Posix.extSeparator)

searchPathSeparator :: Char Source #

The character that is used to separate the entries in the $PATH environment variable.

isSearchPathSeparator :: Char -> Bool Source #

Is the character a file separator?

> Posix.isSearchPathSeparator a == (a == Posix.searchPathSeparator)

addTrailingPathSeparator :: String -> String Source #

Deprecated: Use System.FilePath.addTrailingPathSeparator instead.

This is largely for FilePath compatibility

dropTrailingPathSeparator :: String -> String Source #

Deprecated: Use System.FilePath.dropTrailingPathSeparator instead.

This is largely for FilePath compatibility

hasTrailingPathSeparator :: String -> Bool Source #

Deprecated: Use System.FilePath.hasTrailingPathSeparator instead.

This is largely for FilePath compatibility

testAll :: [(String, IO ())] Source #