Module

PhantomJS.Stream

Package
purescript-phantom
Repository
purescripters/purescript-phantom

This module defines types and functions for working with file streams.

#StreamSettings Source

newtype StreamSettings

The filemode and character set settings needed to open a stream.

Instances

#withSettings Source

withSettings :: FileMode -> Encoding -> StreamSettings

Helper for creating a StreamSettings type

#Stream Source

data Stream :: Type

#open Source

open :: forall e. FilePath -> StreamSettings -> PhantomFSAff e Stream

Open a file stream

#write Source

write :: forall e. Stream -> String -> PhantomFSAff e Unit

Write to a file stream

#writeLine Source

writeLine :: forall e. Stream -> String -> PhantomFSAff e Unit

Write a line to a file stream

#readLine Source

readLine :: forall e. Stream -> PhantomFSAff e (Maybe String)

Read a line from a file stream

#read Source

read :: forall e. Stream -> PhantomFSAff e (Maybe String)

Read the entire stream

#close Source

close :: forall e. Stream -> PhantomFSAff e Unit

Close a file stream

#seek Source

seek :: forall e. Stream -> Int -> PhantomFSAff e Unit