Module
Node.FS.Sync
- Package
- purescript-node-fs
- Repository
- purescript-node/purescript-node-fs
#readTextFile Source
readTextFile :: Encoding -> FilePath -> Effect String
Reads the entire contents of a text file with the specified encoding.
#appendFile Source
appendFile :: FilePath -> Buffer -> Effect Unit
Appends the contents of a buffer to a file.
#fdOpen Source
fdOpen :: FilePath -> FileFlags -> Maybe FileMode -> Effect FileDescriptor
Open a file synchronously. See the Node documentation for details.
#fdRead Source
fdRead :: FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Effect ByteCount
Read from a file synchronously. See the Node documentation for details.
#fdNext Source
fdNext :: FileDescriptor -> Buffer -> Effect ByteCount
Convenience function to fill the whole buffer from the current file position.
#fdWrite Source
fdWrite :: FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Effect ByteCount
Write to a file synchronously. See the Node documentation for details.
#fdAppend Source
fdAppend :: FileDescriptor -> Buffer -> Effect ByteCount
Convenience function to append the whole buffer to the current file position.
#fdFlush Source
fdFlush :: FileDescriptor -> Effect Unit
Flush a file synchronously. See the Node documentation for details.
#fdClose Source
fdClose :: FileDescriptor -> Effect Unit
Close a file synchronously. See the Node documentation for details.