Portability | Rank2Types |
---|---|
Stability | experimental |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | None |
- (</>~) :: Setting a b FilePath FilePath -> FilePath -> a -> b
- (<</>~) :: LensLike ((,) FilePath) a b FilePath FilePath -> FilePath -> a -> (FilePath, b)
- (<.>~) :: Setting a b FilePath FilePath -> String -> a -> b
- (<<.>~) :: LensLike ((,) FilePath) a b FilePath FilePath -> String -> a -> (FilePath, b)
- (</>=) :: MonadState a m => SimpleSetting a FilePath -> FilePath -> m ()
- (<</>=) :: MonadState a m => SimpleLensLike ((,) FilePath) a FilePath -> FilePath -> m FilePath
- (<.>=) :: MonadState a m => SimpleSetting a FilePath -> String -> m ()
- (<<.>=) :: MonadState a m => SimpleLensLike ((,) FilePath) a FilePath -> String -> m FilePath
- basename :: Simple Lens FilePath FilePath
- directory :: Simple Lens FilePath FilePath
- extension :: Simple Lens FilePath FilePath
- filename :: Simple Lens FilePath FilePath
Documentation
(</>~) :: Setting a b FilePath FilePath -> FilePath -> a -> bSource
Modify the path by adding another path.
>>>
:m + Control.Lens
>>>
both </>~ "!!!" $ ("hello","world")
("hello/!!!","world/!!!")
(</>~
) ::Setter
a bFilePath
FilePath
->FilePath
-> a -> b (</>~
) ::Iso
a bFilePath
FilePath
->FilePath
-> a -> b (</>~
) ::Lens
a bFilePath
FilePath
->FilePath
-> a -> b (</>~
) ::Traversal
a bFilePath
FilePath
->FilePath
-> a -> b
(<.>~) :: Setting a b FilePath FilePath -> String -> a -> bSource
Modify the path by adding extension.
>>>
:m + Control.Lens
>>>
both <.>~ "!!!" $ ("hello","world")
("hello.!!!","world.!!!")
(<.>~
) ::Setter
a bFilePath
FilePath
->String
-> a -> b (<.>~
) ::Iso
a bFilePath
FilePath
->String
-> a -> b (<.>~
) ::Lens
a bFilePath
FilePath
->String
-> a -> b (<.>~
) ::Traversal
a bFilePath
FilePath
->String
-> a -> b
(</>=) :: MonadState a m => SimpleSetting a FilePath -> FilePath -> m ()Source
Modify the target(s) of a Simple
Lens
, Iso
, Setter
or Traversal
by adding a path.
(</>=
) ::MonadState
a m =>Simple
Setter
aFilePath
->FilePath
-> m () (</>=
) ::MonadState
a m =>Simple
Iso
aFilePath
->FilePath
-> m () (</>=
) ::MonadState
a m =>Simple
Lens
aFilePath
->FilePath
-> m () (</>=
) ::MonadState
a m =>Simple
Traversal
aFilePath
->FilePath
-> m ()
(<</>=) :: MonadState a m => SimpleLensLike ((,) FilePath) a FilePath -> FilePath -> m FilePathSource
(<.>=) :: MonadState a m => SimpleSetting a FilePath -> String -> m ()Source
Modify the target(s) of a Simple
Lens
, Iso
, Setter
or Traversal
by adding an extension.
(<.>=
) ::MonadState
a m =>Simple
Setter
aFilePath
->String
-> m () (<.>=
) ::MonadState
a m =>Simple
Iso
aFilePath
->String
-> m () (<.>=
) ::MonadState
a m =>Simple
Lens
aFilePath
->String
-> m () (<.>=
) ::MonadState
a m =>Simple
Traversal
aFilePath
->String
-> m ()
(<<.>=) :: MonadState a m => SimpleLensLike ((,) FilePath) a FilePath -> String -> m FilePathSource
basename :: Simple Lens FilePath FilePathSource
A lens reading and writing to the basename.
>>>
basename .~ "filename" $ "path/name.png"
"path/filename.png"
directory :: Simple Lens FilePath FilePathSource
A lens reading and writing to the directory.
>>>
"long/path/name.txt" ^. directory
"long/path"