libfuse3-0.1.0.0: A Haskell binding for libfuse-3.x
Safe HaskellNone
LanguageHaskell2010

System.LibFuse3.Internal.Resource

Description

Utils related to ResourceT

This is an internal module. It is exposed to allow fine-tuning and workarounds but its API is not stable.

Synopsis

Documentation

daemonizeResourceT :: ResourceT IO a -> ResourceT IO b Source #

Forks a new process and transfers the resources to it.

The parent process exitImmediately.

resCallocBytes :: Int -> ResourceT IO (ReleaseKey, Ptr a) Source #

callocBytes with free associated as a cleanup action.

resMallocBytes :: Int -> ResourceT IO (ReleaseKey, Ptr a) Source #

mallocBytes with free associated as a cleanup action.

resNew :: Storable a => a -> ResourceT IO (ReleaseKey, Ptr a) Source #

new with free associated as a cleanup action.

resNewCString :: String -> ResourceT IO (ReleaseKey, CString) Source #

newCString with free associated as a cleanup action.

resNewFilePath :: FilePath -> ResourceT IO (ReleaseKey, CString) Source #

newFilePath with free associated as a cleanup action.

resNewArray :: Storable a => [a] -> ResourceT IO (ReleaseKey, Ptr a) Source #

newArray with free associated as a cleanup action.