Module

Node.FS.Aff

Package
purescript-node-fs-aff
Repository
purescript-node/purescript-node-fs-aff

#rename Source

rename :: forall eff. FilePath -> FilePath -> Aff (fs :: FS | eff) Unit

Rename a file.

#truncate Source

truncate :: forall eff. FilePath -> Int -> Aff (fs :: FS | eff) Unit

Truncates a file to the specified length.

#chown Source

chown :: forall eff. FilePath -> Int -> Int -> Aff (fs :: FS | eff) Unit

Changes the ownership of a file.

#chmod Source

chmod :: forall eff. FilePath -> Perms -> Aff (fs :: FS | eff) Unit

Changes the permissions of a file.

#stat Source

stat :: forall eff. FilePath -> Aff (fs :: FS | eff) Stats

Gets file statistics.

#realpath Source

realpath :: forall eff. FilePath -> Aff (fs :: FS | eff) FilePath

Find the canonicalized absolute location for a path.

#realpath' Source

realpath' :: forall cache eff. FilePath -> Record cache -> Aff (fs :: FS | eff) FilePath

Find the canonicalized absolute location for a path using a cache object for already resolved paths.

#rmdir Source

rmdir :: forall eff. FilePath -> Aff (fs :: FS | eff) Unit

Deletes a directory.

#mkdir Source

mkdir :: forall eff. FilePath -> Aff (fs :: FS | eff) Unit

Makes a new directory.

#mkdir' Source

mkdir' :: forall eff. FilePath -> Perms -> Aff (fs :: FS | eff) Unit

Makes a new directory with the specified permissions.

#readdir Source

readdir :: forall eff. FilePath -> Aff (fs :: FS | eff) (Array FilePath)

Reads the contents of a directory.

#utimes Source

utimes :: forall eff. FilePath -> DateTime -> DateTime -> Aff (fs :: FS | eff) Unit

Sets the accessed and modified times for the specified file.

#readFile Source

readFile :: forall eff. FilePath -> Aff (buffer :: BUFFER, fs :: FS | eff) Buffer

Reads the entire contents of a file returning the result as a raw buffer.

#readTextFile Source

readTextFile :: forall eff. Encoding -> FilePath -> Aff (fs :: FS | eff) String

Reads the entire contents of a text file with the specified encoding.

#writeFile Source

writeFile :: forall eff. FilePath -> Buffer -> Aff (buffer :: BUFFER, fs :: FS | eff) Unit

Writes a buffer to a file.

#writeTextFile Source

writeTextFile :: forall eff. Encoding -> FilePath -> String -> Aff (fs :: FS | eff) Unit

Writes text to a file using the specified encoding.

#appendFile Source

appendFile :: forall eff. FilePath -> Buffer -> Aff (buffer :: BUFFER, fs :: FS | eff) Unit

Appends the contents of a buffer to a file.

#appendTextFile Source

appendTextFile :: forall eff. Encoding -> FilePath -> String -> Aff (fs :: FS | eff) Unit

Appends text to a file using the specified encoding.

#exists Source

exists :: forall eff. String -> Aff (fs :: FS | eff) Boolean

Check to see if a file exists.

#fdOpen Source

fdOpen :: forall eff. FilePath -> FileFlags -> Maybe FileMode -> Aff (fs :: FS | eff) FileDescriptor

Open a file asynchronously. See the Node Documentation for details.

#fdRead Source

fdRead :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Aff (buffer :: BUFFER, fs :: FS | eff) ByteCount

Read from a file asynchronously. See the Node Documentation for details.

#fdNext Source

fdNext :: forall eff. FileDescriptor -> Buffer -> Aff (buffer :: BUFFER, fs :: FS | eff) ByteCount

Convenience function to fill the whole buffer from the current file position.

#fdWrite Source

fdWrite :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Aff (buffer :: BUFFER, fs :: FS | eff) ByteCount

Write to a file asynchronously. See the Node Documentation for details.

#fdAppend Source

fdAppend :: forall eff. FileDescriptor -> Buffer -> Aff (buffer :: BUFFER, fs :: FS | eff) ByteCount

Convenience function to append the whole buffer to the current file position.

#fdClose Source

fdClose :: forall eff. FileDescriptor -> Aff (fs :: FS | eff) Unit

Close a file asynchronously. See the Node Documentation for details.

Re-exports from Node.FS

#FS Source

data FS :: Effect

Effect type for file system usage.

Modules
Node.FS.Aff