File tree Expand file tree Collapse file tree 4 files changed +4
-21
lines changed Expand file tree Collapse file tree 4 files changed +4
-21
lines changed Original file line number Diff line number Diff line change 44
55// module Node.FS.Async
66
7- exports . fs = require ( 'fs' ) ;
8-
97exports . handleCallbackImpl = function ( left , right , f ) {
108 return function ( err , value ) {
119 if ( err ) {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ foreign import handleCallbackImpl ::
6161handleCallback :: forall eff a . (Callback eff a ) -> JSCallback a
6262handleCallback cb = runFn3 handleCallbackImpl Left Right cb
6363
64- foreign import fs ::
64+ fs ::
6565 { rename :: Fn3 FilePath FilePath (JSCallback Unit ) Unit
6666 , truncate :: Fn3 FilePath Int (JSCallback Unit ) Unit
6767 , chown :: Fn4 FilePath Int Int (JSCallback Unit ) Unit
@@ -85,6 +85,7 @@ foreign import fs ::
8585 , write :: Fn6 FileDescriptor Buffer BufferOffset BufferLength (Nullable FilePosition ) (JSCallback ByteCount ) Unit
8686 , close :: Fn2 FileDescriptor (JSCallback Unit ) Unit
8787 }
88+ fs = unsafeRequireFS
8889
8990-- | Type synonym for callback functions.
9091type 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())
4949import Node.FS.Perms
5050import Node.FS.Internal
5151
52- foreign import fs ::
52+ fs ::
5353 { renameSync :: Fn2 FilePath FilePath Unit
5454 , truncateSync :: Fn2 FilePath Int Unit
5555 , chownSync :: Fn3 FilePath Int Int Unit
@@ -74,6 +74,7 @@ foreign import fs ::
7474 , fsyncSync :: Fn1 FileDescriptor Unit
7575 , closeSync :: Fn1 FileDescriptor Unit
7676 }
77+ fs = unsafeRequireFS
7778
7879-- | Renames a file.
7980rename :: forall eff . FilePath
You can’t perform that action at this time.
0 commit comments