|
|
|
|
| Synopsis |
|
| coerceObject :: Path s p o -> Path s p o' | | | coerceType :: Path s p o -> Path s p' o | | | data Posix | | | data W32 | | | data Directory | | | data File | | | data Any | | | class DirectoryW w | | | class FileW w | | | data Absolute | | | data Relative | | | data Sub | | | class SuffixClass x where | | | | class AbsoluteW w | | | class RelativeW w | | | type Name = ByteString | | | data PathType spec path => Path spec path object = Path ByteString | | | class PathType spec path where | | | | editPath :: PathType a b => Path a b c -> (ByteString -> ByteString) -> Path a b c | | | root :: PathType spec path => Path spec path object | | | parse :: forall spec path object. PathType spec path => ByteString -> Path spec path object | | | relParse :: forall spec path object. PathType spec path => ByteString -> Maybe (Path spec path object) | | | absParse :: forall spec path object. PathType spec path => ByteString -> Maybe (Path spec path object) | | | winParse :: forall spec path object. PathType spec path => (ByteString -> Maybe (Path spec path object)) -> ByteString -> Maybe (Path spec path object) | | | relParent :: (PathType spec rel, DirectoryW dir, RelativeW rel) => Path spec rel object -> Path spec rel dir | | | absParent :: (PathType spec abs, DirectoryW dir, AbsoluteW abs) => Path spec abs object -> Path spec abs dir | | | | | singleton :: forall spec path object. PathType spec path => Path spec path object -> Maybe ByteString | | | directory :: forall spec path object rel. (PathType spec path, PathType spec rel, RelativeW rel) => Path spec path object -> Split ByteString (Path spec rel object) | | | file :: forall spec path dir object. (PathType spec path, PathType spec path, DirectoryW dir) => Path spec path object -> Split (Path spec path dir) ByteString | | | isRoot :: (PathType spec path, DirectoryW dir) => Path spec path dir -> Bool | | | isPrefix :: PathType spec path => Path spec path object -> Path spec path object' -> Bool | | | basename :: forall spec path object. PathType spec path => Path spec path object -> Name | | | join :: forall spec path obj obj'. PathType spec path => Path spec path obj -> Name -> Path spec path obj' | | | safeJoin :: forall spec path obj obj'. PathType spec path => Path spec path obj -> Name -> Path spec path obj' | | | (<.>) :: forall spec path obj. PathType spec path => Path spec path obj -> Name -> Path spec path obj | | | (+/+) :: forall spec path dir rel object. (PathType spec path, PathType spec rel, RelativeW rel, DirectoryW dir) => Path spec path dir -> Path spec rel object -> Path spec path object | | | relativeTo :: (PathType spec path, PathType spec rel, RelativeW rel, DirectoryW dir) => Path spec path dir -> Path spec path object -> Maybe (Path spec rel object) | | | parents :: forall spec abs object dir. (PathType spec abs, AbsoluteW abs, DirectoryW dir) => Path spec abs object -> [Path spec abs dir] | | | pathToString :: PathType spec path => Path spec path object -> String | | | parsePath :: PathType spec path => String -> Maybe (Path spec path object) | | | renamePath :: forall spec path dir object object'. (PathType spec path, PathType spec Relative, DirectoryW dir) => Path spec path dir -> Path spec path dir -> Path spec path object' -> Path spec path object' | | | eitherPath :: (PathType spec abs, PathType spec rel, AbsoluteW abs, RelativeW rel) => String -> Either (Path spec abs object) (Path spec rel object) | | | pathInvariants :: PathType a b => Path a b c -> Bool | | | ioAbsolute :: forall spec path object. (PathType spec Absolute, PathType spec path) => Path spec path object -> IO (Path spec Absolute object) |
|
|
| Documentation |
|
|
|
|
|
|
| Posix is the real POSIX paths, where foo/.. can mean something else than
.. It is a runtime error to join .. to a POSIX path (by extension, such
paths cannot be parsed if they contain .. components). You need to use
ioJoin / ioParsePath and related to handle these paths.
|
|
|
|
| The W32 type represents Windows-style paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| class PathType spec path where | Source |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Check whether a path is a prefix of another path.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| The list of parent paths. This does not make sense for Relative paths as
each relative path has a parent (. -> ..).
|
|
|
| Turn a path to a String that can be used with traditional String-based
filepath code, like System.IO and friends.
|
|
|
| Turn a String into a Path. This may fail, depending on the type of path
you requested and the content of the string you passed.
|
|
|
| :: forall spec path dir object object' . (PathType spec path, PathType spec Relative, DirectoryW dir) | | | => Path spec path dir | From: the directory to rename.
| | -> Path spec path dir | To: the new name of the directory.
| | -> Path spec path object' | The path to project.
| | -> Path spec path object' | |
|
|
|
| See Data.Path.eitherPath.
|
|
|
| Check various path invariants.
|
|
|
| NB. This is not threadsafe. Turn a relative path (relative to current
working directory) into an absolute path.
|
|
| Produced by Haddock version 2.6.0 |