fs-api-0.3.0.1: Abstract interface for the file system
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.FS.IO.Unix

Description

This module is mainly meant to be used for the IO implementation of HasFS.

Synopsis

Documentation

closeFHandleIO () Source #

Close handle

This is a no-op when the handle is already closed.

getSizeFHandleIO Word64 Source #

File size of the given file pointer

NOTE: This is not thread safe (changes made to the file in other threads may affect this thread).

openFilePathOpenModeIO Fd Source #

Opens a file from disk.

preadBufFHandlePtr Word8ByteCountFileOffsetIO ByteCount Source #

preadBuf fh buf c off reads c bytes into the buffer buf from the file handle fh at the file offset off. This does not move the position of the file handle.

pwriteBufFHandlePtr Word8ByteCountFileOffsetIO ByteCount Source #

pwriteBuf fh buf c off writes c bytes from the data in the buffer buf to the file handle fh at the file offset off. This does not move the position of the file handle.

readFHandleWord64IO ByteString Source #

Reads a given number of bytes from the input FHandle.

seekFHandleSeekModeInt64IO () Source #

Seek within the file.

The offset may be negative.

We don't return the new offset since the behaviour of lseek is rather odd (e.g., the file pointer may not actually be moved until a subsequent write)

truncateFHandleWord64IO () Source #

Truncates the file managed by the input FHandle to the input size.

writeFHandlePtr Word8Int64IO Word32 Source #

Writes the data pointed by the input 'Ptr Word8' into the input FHandle.