Safe Haskell | Safe |
---|---|
Language | Haskell98 |
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.
- type Path = Path System
- type AbsFile = AbsFile System
- type RelFile = RelFile System
- type AbsDir = AbsDir System
- type RelDir = RelDir System
- type Abs fd = Abs System fd
- type Rel fd = Rel System fd
- type File ar = File System ar
- type Dir ar = Dir System ar
- type AbsRelFile = AbsRelFile System
- type AbsRelDir = AbsRelDir System
- type AbsFileDir = AbsFileDir System
- type RelFileDir = RelFileDir System
- type AbsRel fd = AbsRel System fd
- type FileDir ar = FileDir System ar
- type AbsRelFileDir = AbsRelFileDir System
- type AbsPath fd = AbsPath System fd
- type RelPath fd = RelPath System fd
- type FilePath ar = FilePath System ar
- type DirPath ar = DirPath System ar
- type AbsRelPath fd = AbsRelPath System fd
- type FileDirPath ar = FileDirPath System ar
- asPath :: (AbsOrRel ar, FileOrDir fd) => String -> Path ar fd
- asRelFile :: String -> RelFile
- asRelDir :: String -> RelDir
- asAbsFile :: String -> AbsFile
- asAbsDir :: String -> AbsDir
- asRelPath :: FileOrDir fd => String -> RelPath fd
- asAbsPath :: FileOrDir fd => String -> AbsPath fd
- asFilePath :: AbsOrRel ar => String -> FilePath ar
- asDirPath :: AbsOrRel ar => String -> DirPath ar
- path :: (AbsRel ar, FileDir fd) => String -> Path ar fd
- maybe :: (AbsRel ar, FileDir fd) => String -> Maybe (Path ar fd)
- maybePath :: (AbsRel ar, FileDir fd) => String -> Maybe (Path ar fd)
- parse :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd)
- parsePath :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd)
- relFile :: String -> RelFile
- relDir :: String -> RelDir
- absFile :: String -> AbsFile
- absDir :: String -> AbsDir
- abs :: FileDir fd => String -> Abs fd
- rel :: FileDir fd => String -> Rel fd
- absRel :: FileDir fd => String -> AbsRel fd
- file :: AbsRel ar => String -> File ar
- dir :: AbsRel ar => String -> Dir ar
- fileDir :: AbsRel ar => String -> FileDir ar
- relPath :: FileDir fd => String -> RelPath fd
- absPath :: FileDir fd => String -> AbsPath fd
- filePath :: AbsRel ar => String -> FilePath ar
- dirPath :: AbsRel ar => String -> DirPath ar
- rootDir :: AbsDir
- currentDir :: RelDir
- emptyFile :: RelFile
- toString :: (AbsRel ar, FileDir fd) => Path ar fd -> String
- isAbsoluteString :: String -> Bool
- isRelativeString :: String -> Bool
- equalFilePath :: String -> String -> Bool
- pathSeparator :: Char
- pathSeparators :: [Char]
- isPathSeparator :: Char -> Bool
- extSeparator :: Char
- isExtSeparator :: Char -> Bool
- searchPathSeparator :: Char
- isSearchPathSeparator :: Char -> Bool
- addTrailingPathSeparator :: String -> String
- dropTrailingPathSeparator :: String -> String
- hasTrailingPathSeparator :: String -> Bool
- testAll :: [(String, IO ())]
Documentation
type AbsRelFile = AbsRelFile System Source #
type AbsFileDir = AbsFileDir System Source #
type RelFileDir = RelFileDir System Source #
type AbsRelFileDir = AbsRelFileDir System Source #
type AbsRelPath fd = AbsRelPath System fd Source #
type FileDirPath ar = FileDirPath System ar Source #
maybePath :: (AbsRel ar, FileDir fd) => String -> Maybe (Path ar fd) Source #
Deprecated: Use Path.maybe instead.
parsePath :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd) Source #
Deprecated: Use Path.parse instead.
currentDir :: RelDir 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.
pathSeparator :: Char Source #
pathSeparators :: [Char] Source #
isPathSeparator :: Char -> Bool Source #
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