Skip to content

Commit

Permalink
feat: remove Node.FS.Sync.fdFlush
Browse files Browse the repository at this point in the history
  • Loading branch information
srghma committed Oct 6, 2024
1 parent 1319b6b commit a5408da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
26 changes: 2 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Breaking changes:

New features:

- Add functions to `Node.FS.Async`
- Add functions to `Node.FS.Async`, `Node.FS.Aff`, `Node.FS.Sync`

- readdir'
- readdirBuffer
Expand Down Expand Up @@ -39,29 +39,7 @@ New features:
- statfs
- writev

- Add functions to `Node.FS.Aff`

- cp
- cp'
- fchmod
- fchown
- fdatasync
- fstat
- fsync
- ftruncate
- futimes
- glob
- glob'
- globDirent
- globDirent'
- lchmod
- lchown
- lutimes
- opendir
- opendir'
- readv
- statfs
- writev
- Deprecate `Node.FS.Sync.fdFlush`, `Node.FS.Sync.fsync` should be used instead

- Add modules `Dir`, `Dir.Aff`, `Dirent`

Expand Down
7 changes: 0 additions & 7 deletions src/Node/FS/Sync.purs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ module Node.FS.Sync
, fdWrite'
, fdWriteString
, fdAppend
, fdFlush
, fdClose
, cp
, cp'
Expand Down Expand Up @@ -101,7 +100,6 @@ import Node.FS.Internal.Utils (datetimeToUnixEpochTimeInSeconds)
import Node.FS.Perms (Perms, permsToString)
import Node.FS.Stats (Stats)
import Node.Path (FilePath)
import Prim.TypeError (class Warn, Text)
import Unsafe.Coerce (unsafeCoerce)

foreign import accessSyncImpl :: EffectFn2 FilePath AccessMode Unit
Expand Down Expand Up @@ -526,11 +524,6 @@ fdAppend fd buff = do
sz <- size buff
fdWrite fd buff 0 sz Nothing

-- | Flush a file synchronously. See the [Node documentation](http://nodejs.org/api/fs.html#fs_fs_fsyncsync_fd)
-- | for details.
fdFlush :: Warn (Text "Deprecated, use fsync") => FileDescriptor -> Effect Unit
fdFlush = fsync

-- | Close a file synchronously. See the [Node documentation](http://nodejs.org/api/fs.html#fs_fs_closesync_fd)
-- | for details.
fdClose :: FileDescriptor -> Effect Unit
Expand Down

0 comments on commit a5408da

Please sign in to comment.