File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ module Spago.Paths where
22
33import Prelude
44
5+ import Data.Array (cons , replicate , reverse )
6+ import Data.String (joinWith )
7+ import Effect.Class (class MonadEffect , liftEffect )
58import Effect.Unsafe (unsafePerformEffect )
69import Node.Path (FilePath )
710import Node.Path as Path
811import Node.Process as Process
9- import Data.Array (cons , replicate , reverse )
10- import Data.String (joinWith )
1112
1213type NodePaths =
1314 { config :: FilePath
@@ -22,6 +23,9 @@ foreign import paths :: NodePaths
2223cwd :: FilePath
2324cwd = unsafePerformEffect (Process .cwd)
2425
26+ chdir :: forall m . MonadEffect m => FilePath -> m Unit
27+ chdir dir = liftEffect $ Process .chdir dir
28+
2529mkRelative :: FilePath -> FilePath
2630mkRelative = Path .relative cwd
2731
You can’t perform that action at this time.
0 commit comments