Module

Node.FS.Stream

#createWriteStream

createWriteStream :: FilePath -> Effect (Writable ())

Create a Writable stream which writes data to the specified file, using the default options.

#WriteStreamOptions

type WriteStreamOptions :: Row Typetype WriteStreamOptions = (autoClose :: Boolean, emitClose :: Boolean, encoding :: String, flags :: String, mode :: Int, start :: Int)

#createWriteStream'

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

fdCreateWriteStream :: FileDescriptor -> Effect (Writable ())

Create a Writable stream which writes data to the specified file descriptor, using the default options.

#fdCreateWriteStream'

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

createReadStream :: FilePath -> Effect (Readable ())

Create a Readable stream which reads data to the specified file, using the default options.

#ReadStreamOptions

type ReadStreamOptions :: Row Typetype ReadStreamOptions = (autoClose :: Boolean, emitClose :: Boolean, encoding :: String, end :: Int, flags :: String, highWaterMark :: Int, mode :: Int, start :: Int)

#createReadStream'

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

fdCreateReadStream :: FileDescriptor -> Effect (Readable ())

Create a Readable stream which reads data to the specified file descriptor, using the default options.

#fdCreateReadStream'

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
  }

Modules