Safe Haskell | None |
---|---|
Language | GHC2021 |
FileSystem.Path
Description
Provides utilities for working with Path
.
Since: 0.1
Synopsis
- pattern MkPath :: OsPath -> Path b t
- absdirPathSep :: QuasiQuoter
- absfilePathSep :: QuasiQuoter
- reldirPathSep :: QuasiQuoter
- relfilePathSep :: QuasiQuoter
- (<</>>) :: Path b Dir -> Path Rel t -> Path b t
- addExtension :: (HasCallStack, MonadThrow m) => OsPath -> Path b File -> m (Path b File)
- splitExtension :: (HasCallStack, MonadThrow m) => Path b File -> m (Path b File, OsPath)
- fileExtension :: (HasCallStack, MonadThrow m) => Path b File -> m OsPath
- replaceExtension :: (HasCallStack, MonadThrow m) => OsPath -> Path b File -> m (Path b File)
- parseAbsDir :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Abs Dir)
- parseAbsFile :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Abs File)
- parseRelDir :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Rel Dir)
- parseRelFile :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Rel File)
- toOsPath :: Path b t -> OsPath
- data Path b t
- data Abs
- data Rel
- data Dir
- data File
Pattern Synonym
QuasiQuoters
absdirPathSep :: QuasiQuoter Source #
Like absdir
, except it runs paths through a "replace function"
first. On unix, replaces \
with /
. On windows, does the opposite.
Since: 0.1
absfilePathSep :: QuasiQuoter Source #
Like absfile
, except it runs paths through a "replace function"
first. On unix, replaces \
with /
. On windows, does the opposite.
Since: 0.1
reldirPathSep :: QuasiQuoter Source #
Like reldir
, except it runs paths through a "replace function"
first. On unix, replaces \
with /
. On windows, does the opposite.
Since: 0.1
relfilePathSep :: QuasiQuoter Source #
Like relfile
, except it runs paths through a "replace function"
first. On unix, replaces \
with /
. On windows, does the opposite.
Since: 0.1
Operations
(<</>>) :: Path b Dir -> Path Rel t -> Path b t infixr 5 Source #
Alias for </>
, intended to allow unqualified usage alongside
OsPath'
s </>
.
Since: 0.1
addExtension :: (HasCallStack, MonadThrow m) => OsPath -> Path b File -> m (Path b File) Source #
Like addExtension
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
splitExtension :: (HasCallStack, MonadThrow m) => Path b File -> m (Path b File, OsPath) Source #
Like splitExtension
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
fileExtension :: (HasCallStack, MonadThrow m) => Path b File -> m OsPath Source #
Like fileExtension
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
replaceExtension :: (HasCallStack, MonadThrow m) => OsPath -> Path b File -> m (Path b File) Source #
Like replaceExtension
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
Parsing
parseAbsDir :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Abs Dir) Source #
Like parseAbsDir
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
parseAbsFile :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Abs File) Source #
Like parseAbsFile
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
parseRelDir :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Rel Dir) Source #
Like parseRelDir
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
parseRelFile :: (HasCallStack, MonadThrow m) => OsPath -> m (Path Rel File) Source #
Like parseRelFile
, but in terms of OsPath
rather than system
specific type.
Since: 0.1
Elimination
Re-exports
Instances
(Typeable b, Typeable t) => Lift (Path b t :: Type) | |||||
NFData (Path b t) | |||||
Defined in OsPath.Internal.Posix | |||||
(Data b, Data t) => Data (Path b t) | |||||
Defined in OsPath.Internal.Posix Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Path b t -> c (Path b t) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Path b t) # toConstr :: Path b t -> Constr # dataTypeOf :: Path b t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Path b t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Path b t)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Path b t -> Path b t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Path b t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Path b t -> r # gmapQ :: (forall d. Data d => d -> u) -> Path b t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Path b t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) # | |||||
Generic (Path b t) | |||||
Defined in OsPath.Internal.Posix Associated Types
| |||||
Show (Path b t) | |||||
Eq (Path b t) | |||||
Ord (Path b t) | |||||
Defined in OsPath.Internal.Posix | |||||
Hashable (Path b t) | |||||
type Rep (Path b t) | |||||
Defined in OsPath.Internal.Posix |
Instances
Data Abs | |
Defined in OsPath.Posix Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Abs -> c Abs # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Abs # dataTypeOf :: Abs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Abs) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Abs) # gmapT :: (forall b. Data b => b -> b) -> Abs -> Abs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs -> r # gmapQ :: (forall d. Data d => d -> u) -> Abs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Abs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Abs -> m Abs # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Abs -> m Abs # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Abs -> m Abs # |
Instances
Data Rel | |
Defined in OsPath.Posix Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rel -> c Rel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Rel # dataTypeOf :: Rel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Rel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rel) # gmapT :: (forall b. Data b => b -> b) -> Rel -> Rel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rel -> r # gmapQ :: (forall d. Data d => d -> u) -> Rel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Rel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rel -> m Rel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rel -> m Rel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rel -> m Rel # |
Instances
Data Dir | |
Defined in OsPath.Posix Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dir -> c Dir # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Dir # dataTypeOf :: Dir -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Dir) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Dir) # gmapT :: (forall b. Data b => b -> b) -> Dir -> Dir # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dir -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dir -> r # gmapQ :: (forall d. Data d => d -> u) -> Dir -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Dir -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dir -> m Dir # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dir -> m Dir # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dir -> m Dir # |
Instances
Data File | |
Defined in OsPath.Posix Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> File -> c File # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c File # dataTypeOf :: File -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c File) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c File) # gmapT :: (forall b. Data b => b -> b) -> File -> File # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> File -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> File -> r # gmapQ :: (forall d. Data d => d -> u) -> File -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> File -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> File -> m File # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> File -> m File # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> File -> m File # |