Module

Node.FS.Aff

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

#rename Source

rename :: FilePath -> FilePath -> Aff Unit

Rename a file.

#truncate Source

truncate :: FilePath -> Int -> Aff Unit

Truncates a file to the specified length.

#chown Source

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

Changes the ownership of a file.

#chmod Source

chmod :: FilePath -> Perms -> Aff Unit

Changes the permissions of a file.

#stat Source

stat :: FilePath -> Aff Stats

Gets file statistics.

#lstat Source

lstat :: FilePath -> Aff Stats

Gets file or symlink statistics. lstat is identical to stat, except that if the FilePath is a symbolic link, then the link itself is stat-ed, not the file that it refers to.

#realpath Source

realpath :: FilePath -> Aff FilePath

Find the canonicalized absolute location for a path.

#realpath' Source

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 Source

rmdir :: FilePath -> Aff Unit

Deletes a directory.

#rmdir' Source

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

Deletes a directory with options.

#rm Source

rm :: FilePath -> Aff Unit

Deletes a file or directory.

#rm' Source

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

Deletes a file or directory with options.

#mkdir Source

mkdir :: FilePath -> Aff Unit

Makes a new directory.

#mkdir' Source

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

Makes a new directory with all of its options.

#readdir Source

readdir :: FilePath -> Aff (Array FilePath)

Reads the contents of a directory.

#utimes Source

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

Sets the accessed and modified times for the specified file.

#readFile Source

readFile :: FilePath -> Aff Buffer

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

#readTextFile Source

readTextFile :: Encoding -> FilePath -> Aff String

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

#writeFile Source

writeFile :: FilePath -> Buffer -> Aff Unit

Writes a buffer to a file.

#writeTextFile Source

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

Writes text to a file using the specified encoding.

#appendFile Source

appendFile :: FilePath -> Buffer -> Aff Unit

Appends the contents of a buffer to a file.

#appendTextFile Source

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

Appends text to a file using the specified encoding.

#fdOpen Source

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

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

#fdRead Source

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

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

#fdNext Source

fdNext :: FileDescriptor -> Buffer -> Aff ByteCount

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

#fdWrite Source

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

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

#fdAppend Source

fdAppend :: FileDescriptor -> Buffer -> Aff ByteCount

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

#fdClose Source

fdClose :: FileDescriptor -> Aff Unit

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