Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 0c46f0c

Browse files
authored
Remove exists since underlying Async.exists was removed (#36)
1 parent 087a985 commit 0c46f0c

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
- Remove `exists` since the underlying `Async.exists` from `purescript-node-fs` has been removed (#36 by @sigma-andex)
89
- Update project and deps to PureScript v0.15.0 (#33 by @JordanMartinez, @thomashoneyman, @sigma-andex)
910
- Update `mkdir'` to take options arg (#34 by @JordanMartinez)
1011

src/Node/FS/Aff.purs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module Node.FS.Aff
2121
, writeTextFile
2222
, appendFile
2323
, appendTextFile
24-
, exists
2524
, fdOpen
2625
, fdRead
2726
, fdNext
@@ -32,10 +31,10 @@ module Node.FS.Aff
3231

3332
import Prelude
3433

35-
import Effect.Aff (Aff, makeAff, nonCanceler)
36-
import Effect (Effect)
3734
import Data.DateTime (DateTime)
3835
import Data.Maybe (Maybe)
36+
import Effect (Effect)
37+
import Effect.Aff (Aff, makeAff, nonCanceler)
3938
import Node.Buffer (Buffer)
4039
import Node.Encoding (Encoding)
4140
import Node.FS as F
@@ -216,11 +215,6 @@ appendFile = toAff2 A.appendFile
216215
appendTextFile :: Encoding -> FilePath -> String -> Aff Unit
217216
appendTextFile = toAff3 A.appendTextFile
218217

219-
-- |
220-
-- | Check to see if a file exists.
221-
-- |
222-
exists :: String -> Aff Boolean
223-
exists file = makeAff \k -> A.exists file (pure >>> k) $> nonCanceler
224218

225219
-- | Open a file asynchronously. See the [Node Documentation](https://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback)
226220
-- | for details.

0 commit comments

Comments
 (0)