Module

Node.FS.Aff

#rename

rename :: FilePath -> FilePath -> Aff Unit

Rename a file.

#truncate

truncate :: FilePath -> Int -> Aff Unit

Truncates a file to the specified length.

#chown

chown :: FilePath -> Int -> Int -> Aff Unit

Changes the ownership of a file.

#chmod

chmod :: FilePath -> Perms -> Aff Unit

Changes the permissions of a file.

#stat

stat :: FilePath -> Aff Stats

Gets file statistics.

#realpath

realpath :: FilePath -> Aff FilePath

Find the canonicalized absolute location for a path.

#realpath'

realpath' :: forall cache. FilePath -> Record cache -> Aff FilePath

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

#rmdir

rmdir :: FilePath -> Aff Unit

Deletes a directory.

#rmdir'

rmdir' :: FilePath -> { maxRetries :: Int, retryDelay :: Int } -> Aff Unit

Deletes a directory with options.

#rm

rm :: FilePath -> Aff Unit

Deletes a file or directory.

#rm'

rm' :: FilePath -> { force :: Boolean, maxRetries :: Int, recursive :: Boolean, retryDelay :: Int } -> Aff Unit

Deletes a file or directory with options.

#mkdir

mkdir :: FilePath -> Aff Unit

Makes a new directory.

#mkdir'

mkdir' :: FilePath -> { mode :: Perms, recursive :: Boolean } -> Aff Unit

Makes a new directory with all of its options.

#readdir

readdir :: FilePath -> Aff (Array FilePath)

Reads the contents of a directory.

#utimes

utimes :: FilePath -> DateTime -> DateTime -> Aff Unit

Sets the accessed and modified times for the specified file.

#readFile

readFile :: FilePath -> Aff Buffer

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

#readTextFile

readTextFile :: Encoding -> FilePath -> Aff String

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

#writeFile

writeFile :: FilePath -> Buffer -> Aff Unit

Writes a buffer to a file.

#writeTextFile

writeTextFile :: Encoding -> FilePath -> String -> Aff Unit

Writes text to a file using the specified encoding.

#appendFile

appendFile :: FilePath -> Buffer -> Aff Unit

Appends the contents of a buffer to a file.

#appendTextFile

appendTextFile :: Encoding -> FilePath -> String -> Aff Unit

Appends text to a file using the specified encoding.

#fdOpen

fdOpen :: FilePath -> FileFlags -> Maybe FileMode -> Aff FileDescriptor

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

#fdRead

fdRead :: FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Aff ByteCount

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

#fdNext

fdNext :: FileDescriptor -> Buffer -> Aff ByteCount

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

#fdWrite

fdWrite :: FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Aff ByteCount

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

#fdAppend

fdAppend :: FileDescriptor -> Buffer -> Aff ByteCount

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

#fdClose

fdClose :: FileDescriptor -> Aff Unit

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

Modules