HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Modulefs-api-0.4.0.0Haskell2010

System.FS.API

An abstract view over the filesystem.

Contents
  1. Record that abstracts over the filesystem
  2. Types
  3. Opening and closing files
  4. SomeHasFS
  5. File I/O with user-supplied buffers
Synopsis
  • Packagefs-api-0.4.0.0
  • Exports9
  • LanguageHaskell2010
  • LicenceApache-2.0
  • SourceAPI.hs

Record that abstracts over the filesystem

datadata HasFS (m :: Type -> Type) h

Abstract interface for performing file I/O

User-supplied buffers

For functions that require user-supplied buffers (i.e.,

MutableByteArray

), it is the user's responsiblity to provide buffers that are large enough. Behaviour is undefined if the I/O operations access the buffer outside it's allocated range.

Constructors

Instances1NFData
  • NFData (HasFS m h)Defined in fs-api-0.4.0.0 · System.FS.API

Types

Opening and closing files

SomeHasFS

File I/O with user-supplied buffers

newtypenewtype BufferOffset

Absolute offset into a buffer (i.e., MutableByteArray).

Can be negative, because buffer offsets can be added together to change offset positions. This is similar to plusPtr for Ptr types. However, note that reading or writing from a buffer at a negative offset leads to undefined behaviour.

Instances6Bounded, Enum, Eq, Num, Ord, Show