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

Remove exists since underlying Async.exists was removed #36

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
## [Unreleased]

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

Expand Down
10 changes: 2 additions & 8 deletions src/Node/FS/Aff.purs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module Node.FS.Aff
, writeTextFile
, appendFile
, appendTextFile
, exists
, fdOpen
, fdRead
, fdNext
Expand All @@ -32,10 +31,10 @@ module Node.FS.Aff

import Prelude

import Effect.Aff (Aff, makeAff, nonCanceler)
import Effect (Effect)
import Data.DateTime (DateTime)
import Data.Maybe (Maybe)
import Effect (Effect)
import Effect.Aff (Aff, makeAff, nonCanceler)
import Node.Buffer (Buffer)
import Node.Encoding (Encoding)
import Node.FS as F
Expand Down Expand Up @@ -216,11 +215,6 @@ appendFile = toAff2 A.appendFile
appendTextFile :: Encoding -> FilePath -> String -> Aff Unit
appendTextFile = toAff3 A.appendTextFile

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

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