HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.FileSystem.Posix.File

  • 2 types
  • 41 values

File open flags

2 declarations

File status flags

3 declarations

File creation flags

6 declarations

File create mode

1 declaration

User Permissions

valuesetUr :: FileMode -> FileMode
#
valuesetUw :: FileMode -> FileMode
#
valuesetUx :: FileMode -> FileMode
#
valueclrUr :: FileMode -> FileMode
#
valueclrUw :: FileMode -> FileMode
#
valueclrUx :: FileMode -> FileMode
#

Group Permissions

valuesetGr :: FileMode -> FileMode
#
valuesetGw :: FileMode -> FileMode
#
valuesetGx :: FileMode -> FileMode
#
valueclrGr :: FileMode -> FileMode
#
valueclrGw :: FileMode -> FileMode
#
valueclrGx :: FileMode -> FileMode
#

Other Permissions

valuesetOr :: FileMode -> FileMode
#
valuesetOw :: FileMode -> FileMode
#
valuesetOx :: FileMode -> FileMode
#
valueclrOr :: FileMode -> FileMode
#
valueclrOw :: FileMode -> FileMode
#
valueclrOx :: FileMode -> FileMode
#

Status bits

valuesetSuid :: FileMode -> FileMode
#
valuesetSgid :: FileMode -> FileMode
#
valueclrSuid :: FileMode -> FileMode
#
valueclrSgid :: FileMode -> FileMode
#

Fd based Low Level

2 declarations
valueopenAt
  1. :: Maybe Fd

    Optional directory file descriptor

  2. -> PosixPath

    Pathname to open

  3. -> OpenFlags

    Append, exclusive, truncate, etc.

  4. -> Maybe FileMode

    Create mode

  5. -> IO Fd
#

Open a file relative to an optional directory file descriptor.

Note: In Haskell, using an fd directly for IO may be problematic as blocking file system operations on the file might block the capability and GC for "unsafe" calls. "safe" calls may be more expensive. Also, you may have to synchronize concurrent access via multiple threads.

Handle based

5 declarations
valueopenFile :: PosixPath -> IOMode -> IO Handle
#

Like openFile in base package but using Path instead of FilePath. Use hSetBinaryMode on the handle if you want to use binary mode.

valuewithFile :: PosixPath -> IOMode -> (Handle -> IO r) -> IO r
#

Like withFile in base package but using Path instead of FilePath. Use hSetBinaryMode on the handle if you want to use binary mode.

newtypenewtype Fd
#
Instances13Bounded, Enum, Eq, Integral, Num, Ord, …
  • Bounded FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Enum FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Eq FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Integral FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Num FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Ord FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Read FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Real FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Show FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Ix FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Bits FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • FiniteBits FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types