Node.FS.Stream
- Package
- purescript-node-fs
- Repository
- purescript-node/purescript-node-fs
#createWriteStream Source
createWriteStream :: FilePath -> Effect (Writable ())Create a Writable stream which writes data to the specified file, using the default options.
#WriteStreamOptions Source
type WriteStreamOptions :: Row Typetype WriteStreamOptions = (autoClose :: Boolean, emitClose :: Boolean, encoding :: String, flags :: String, mode :: Int, start :: Int)
#createWriteStream' Source
createWriteStream' :: forall r trash. Union r trash WriteStreamOptions => FilePath -> Record r -> Effect (Writable ())Create a Writable stream which writes data to the specified file.
Unused options should not be specified. Some options
(e.g. flags, encoding, and mode) should convert their
PureScript values to the corresponding JavaScript ones:
filePath # createWriteStream'
{ flags: fileFlagsToNode R
, encoding: encodingToNode UTF8
, mode: permsToInt Perms.all
}
#fdCreateWriteStream Source
fdCreateWriteStream :: FileDescriptor -> Effect (Writable ())Create a Writable stream which writes data to the specified file descriptor, using the default options.
#fdCreateWriteStream' Source
fdCreateWriteStream' :: forall r trash. Union r trash WriteStreamOptions => FileDescriptor -> Record r -> Effect (Writable ())Create a Writable stream which writes data to the specified file descriptor.
Unused options should not be specified. Some options
(e.g. flags, encoding, and mode) should convert their
PureScript values to the corresponding JavaScript ones:
filePath # fdCreateWriteStream'
{ flags: fileFlagsToNode R
, encoding: encodingToNode UTF8
, mode: permsToInt Perms.all
}
#createReadStream Source
createReadStream :: FilePath -> Effect (Readable ())Create a Readable stream which reads data to the specified file, using the default options.
#createReadStream' Source
createReadStream' :: forall r trash. Union r trash ReadStreamOptions => FilePath -> Record r -> Effect (Readable ())Create a Readable stream which reads data from the specified file.
Unused options should not be specified. Some options
(e.g. flags, encoding, and mode) should convert their
PureScript values to the corresponding JavaScript ones:
filePath # createReadStream'
{ flags: fileFlagsToNode R
, encoding: encodingToNode UTF8
, mode: permsToInt Perms.all
}
#fdCreateReadStream Source
fdCreateReadStream :: FileDescriptor -> Effect (Readable ())Create a Readable stream which reads data to the specified file descriptor, using the default options.
#fdCreateReadStream' Source
fdCreateReadStream' :: forall r trash. Union r trash ReadStreamOptions => FileDescriptor -> Record r -> Effect (Readable ())Create a Readable stream which reads data to the specified file descriptor.
Unused options should not be specified. Some options
(e.g. flags, encoding, and mode) should convert their
PureScript values to the corresponding JavaScript ones:
filePath # fdCreateReadStream'
{ flags: fileFlagsToNode R
, encoding: encodingToNode UTF8
, mode: permsToInt Perms.all
}