File tree 4 files changed +4
-21
lines changed
4 files changed +4
-21
lines changed Original file line number Diff line number Diff line change 4
4
5
5
// module Node.FS.Async
6
6
7
- exports . fs = require ( 'fs' ) ;
8
-
9
7
exports . handleCallbackImpl = function ( left , right , f ) {
10
8
return function ( err , value ) {
11
9
if ( err ) {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ foreign import handleCallbackImpl ::
61
61
handleCallback :: forall eff a . (Callback eff a ) -> JSCallback a
62
62
handleCallback cb = runFn3 handleCallbackImpl Left Right cb
63
63
64
- foreign import fs ::
64
+ fs ::
65
65
{ rename :: Fn3 FilePath FilePath (JSCallback Unit ) Unit
66
66
, truncate :: Fn3 FilePath Int (JSCallback Unit ) Unit
67
67
, chown :: Fn4 FilePath Int Int (JSCallback Unit ) Unit
@@ -85,6 +85,7 @@ foreign import fs ::
85
85
, write :: Fn6 FileDescriptor Buffer BufferOffset BufferLength (Nullable FilePosition ) (JSCallback ByteCount ) Unit
86
86
, close :: Fn2 FileDescriptor (JSCallback Unit ) Unit
87
87
}
88
+ fs = unsafeRequireFS
88
89
89
90
-- | Type synonym for callback functions.
90
91
type Callback eff a = Either Error a -> Eff (fs :: FS | eff ) Unit
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ import Node.Path (FilePath())
49
49
import Node.FS.Perms
50
50
import Node.FS.Internal
51
51
52
- foreign import fs ::
52
+ fs ::
53
53
{ renameSync :: Fn2 FilePath FilePath Unit
54
54
, truncateSync :: Fn2 FilePath Int Unit
55
55
, chownSync :: Fn3 FilePath Int Int Unit
@@ -74,6 +74,7 @@ foreign import fs ::
74
74
, fsyncSync :: Fn1 FileDescriptor Unit
75
75
, closeSync :: Fn1 FileDescriptor Unit
76
76
}
77
+ fs = unsafeRequireFS
77
78
78
79
-- | Renames a file.
79
80
rename :: forall eff . FilePath
You can’t perform that action at this time.
0 commit comments