Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- current :: IO (Maybe (Absolute Path To Directory))
- home :: IO (Maybe (Absolute Path To Directory))
- create :: Absolute Path To Directory -> IO ()
- change :: Absolute Path To Directory -> IO ()
- remove :: Absolute Path To Directory -> IO ()
- data Points
- data Origin
- data To
- type Path = Cofree Maybe String
- newtype Outline (origin :: Origin) (points :: Points) = Outline {}
- type family Absolute (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Homeward (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Relative (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- deeper :: Relative Path To points -> Maybe (Relative Path To points)
- part :: String -> Outline origin points
- parent :: Absolute Path To points -> Maybe (Absolute Path To Directory)
- (<^>) :: Relative Path To Directory -> Relative Path To points -> Relative Path To points
- (</>) :: Absolute Path To Directory -> Relative Path To points -> Absolute Path To points
- (<~/>) :: Absolute Path To points -> Homeward Path To points -> Absolute Path To points
CRUD operations for filesystem
current :: IO (Maybe (Absolute Path To Directory)) Source #
Return Nothing, if current working directory is root (cwd)
home :: IO (Maybe (Absolute Path To Directory)) Source #
Retrieve absolute path of home directory (echo ~)
Pure combinators
What is the beginning of the path?
newtype Outline (origin :: Origin) (points :: Points) Source #
The internal type of path representation
Instances
Read (Outline Root Directory) Source # | |
Read (Outline Root File) Source # | |
Read (Outline Home Directory) Source # | |
Read (Outline Home File) Source # | |
Read (Outline Vague Directory) Source # | |
Read (Outline Vague File) Source # | |
Show (Outline Root Directory) Source # | |
Show (Outline Root File) Source # | |
Show (Outline Home Directory) Source # | |
Show (Outline Home File) Source # | |
Show (Outline Vague Directory) Source # | |
Show (Outline Vague File) Source # | |
deeper :: Relative Path To points -> Maybe (Relative Path To points) Source #
Take the next piece of relative path
parent :: Absolute Path To points -> Maybe (Absolute Path To Directory) Source #
Take parent directory of current pointed entity
(<^>) :: Relative Path To Directory -> Relative Path To points -> Relative Path To points Source #
"usr/local/" + "etc/" = "usr/local/etc/"