HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.FileSystem.Posix.File

Contents
  1. File open flags
  2. File status flags
  3. File creation flags
  4. File create mode
  5. User Permissions
  6. Group Permissions
  7. Other Permissions
  8. Status bits
  9. Fd based Low Level
  10. Handle based
Synopsis

File open flags

File status flags

File creation flags

File create mode

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

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

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-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Eq FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Ord FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Read FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Ix FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Bits FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • FiniteBits FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Storable FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types