File tree 3 files changed +3
-32
lines changed
3 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Breaking changes:
8
8
9
9
New features:
10
10
11
- - Add functions to ` Node.FS.Async `
11
+ - Add functions to ` Node.FS.Async ` , ` Node.FS.Aff ` , ` Node.FS.Sync `
12
12
13
13
- readdir'
14
14
- readdirBuffer
@@ -39,29 +39,7 @@ New features:
39
39
- statfs
40
40
- writev
41
41
42
- - Add functions to ` Node.FS.Aff `
43
-
44
- - cp
45
- - cp'
46
- - fchmod
47
- - fchown
48
- - fdatasync
49
- - fstat
50
- - fsync
51
- - ftruncate
52
- - futimes
53
- - glob
54
- - glob'
55
- - globDirent
56
- - globDirent'
57
- - lchmod
58
- - lchown
59
- - lutimes
60
- - opendir
61
- - opendir'
62
- - readv
63
- - statfs
64
- - writev
42
+ - Deprecate ` Node.FS.Sync.fdFlush ` , ` Node.FS.Sync.fsync ` should be used instead
65
43
66
44
- Add modules ` Dir ` , ` Dir.Aff ` , ` Dirent `
67
45
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ module Node.FS.Sync
52
52
, fdWrite'
53
53
, fdWriteString
54
54
, fdAppend
55
- , fdFlush
56
55
, fdClose
57
56
, cp
58
57
, cp'
@@ -101,7 +100,6 @@ import Node.FS.Internal.Utils (datetimeToUnixEpochTimeInSeconds)
101
100
import Node.FS.Perms (Perms , permsToString )
102
101
import Node.FS.Stats (Stats )
103
102
import Node.Path (FilePath )
104
- import Prim.TypeError (class Warn , Text )
105
103
import Unsafe.Coerce (unsafeCoerce )
106
104
107
105
foreign import accessSyncImpl :: EffectFn2 FilePath AccessMode Unit
@@ -526,11 +524,6 @@ fdAppend fd buff = do
526
524
sz <- size buff
527
525
fdWrite fd buff 0 sz Nothing
528
526
529
- -- | Flush a file synchronously. See the [Node documentation](http://nodejs.org/api/fs.html#fs_fs_fsyncsync_fd)
530
- -- | for details.
531
- fdFlush :: Warn (Text " Deprecated, use fsync" ) => FileDescriptor -> Effect Unit
532
- fdFlush = fsync
533
-
534
527
-- | Close a file synchronously. See the [Node documentation](http://nodejs.org/api/fs.html#fs_fs_closesync_fd)
535
528
-- | for details.
536
529
fdClose :: FileDescriptor -> Effect Unit
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ main = do
153
153
fd0 <- S .fdOpen fdFile W (Just 420 )
154
154
buf0 <- Buffer .fromString " [ 42 ]" UTF8
155
155
_bytes0 <- S .fdAppend fd0 buf0
156
- S .fdFlush fd0
156
+ S .fsync fd0
157
157
S .fdClose fd0
158
158
fd1 <- S .fdOpen fdFile R Nothing
159
159
buf1 <- Buffer .create =<< Buffer .size buf0
You can’t perform that action at this time.
0 commit comments