Module

PhantomJS.File

Package
purescript-phantom
Repository
purescripters/purescript-phantom

This module defines types and functions for working with files. The following file modes are currently available:

R - read - don't create file if not exists RW - read+write - don't create fuke if not exists, truncate existing text W - write - create if not exists, truncate existing text A - append - create if not exists, append to existing text

#FilePath Source

#PhantomFSAff Source

type PhantomFSAff e a = Aff (phantomjsfs :: PHANTOMJSFS | e) a

#FileMode Source

data FileMode

File modes for opening a file. Read, Write, Append, Read-Write

Constructors

Instances

#toForeignFileMode Source

toForeignFileMode :: FileMode -> Foreign

Used to convert a FileMode to a foreign type that can be passed into native phantomjs functions.

#PHANTOMJSFS Source

#remove Source

remove :: forall e. FilePath -> Aff (FSEff e) Unit

#exists Source

exists :: forall e. FilePath -> Aff (FSEff e) Boolean

#write Source

write :: forall e. FilePath -> FileContent -> FileMode -> Aff (FSEff e) Unit

#read Source

read :: forall e. FilePath -> Aff (FSEff e) String

#lastModified Source