diff --git a/CHANGELOG.md b/CHANGELOG.md index f59fbee..d71ca0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Breaking changes: New features: +- Update rmdir' to take options arg +- Added rm and rm' versions with and without options arg + Bugfixes: Other improvements: diff --git a/bower.json b/bower.json index 690fa28..727564a 100644 --- a/bower.json +++ b/bower.json @@ -29,7 +29,7 @@ "dependencies": { "purescript-aff": "^7.0.0", "purescript-either": "^6.0.0", - "purescript-node-fs": "^8.0.0", + "purescript-node-fs": "^8.1.0", "purescript-node-path": "^5.0.0" }, "devDependencies": { diff --git a/src/Node/FS/Aff.purs b/src/Node/FS/Aff.purs index ada916d..9b2fd79 100644 --- a/src/Node/FS/Aff.purs +++ b/src/Node/FS/Aff.purs @@ -11,6 +11,9 @@ module Node.FS.Aff , realpath' , unlink , rmdir + , rmdir' + , rm + , rm' , mkdir , mkdir' , readdir @@ -155,6 +158,25 @@ unlink = toAff1 A.unlink rmdir :: FilePath -> Aff Unit rmdir = toAff1 A.rmdir +-- | +-- | Deletes a directory with options. +-- | +rmdir' :: FilePath -> { maxRetries :: Int, retryDelay :: Int } -> Aff Unit +rmdir' = toAff2 A.rmdir' + + +-- | +-- | Deletes a file or directory. +-- | +rm :: FilePath -> Aff Unit +rm = toAff1 A.rmdir + +-- | +-- | Deletes a file or directory with options. +-- | +rm' :: FilePath -> { force :: Boolean, maxRetries :: Int, recursive :: Boolean, retryDelay :: Int } -> Aff Unit +rm' = toAff2 A.rm' + -- | -- | Makes a new directory. -- |