Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
catchThreadError :: IO a -> (ThreadError -> GErrorMessage -> IO a) -> IO agi-glib GI.GLib.Enums Catch exceptions of type ThreadError. This is a specialized version of catchGErrorJustDomain.
handleThreadError :: (ThreadError -> GErrorMessage -> IO a) -> IO a -> IO agi-glib GI.GLib.Enums Handle exceptions of type ThreadError. This is a specialized version of handleGErrorJustDomain.
-
gi-glib GI.GLib.Flags indicates that the io channel is readable. This flag cannot be changed.
fileReadLink :: (HasCallStack, MonadIO m) => [Char] -> m [Char]gi-glib GI.GLib.Functions Reads the contents of the symbolic link filename like the POSIX readlink() function. The returned string is in the encoding used for filenames. Use filenameToUtf8 to convert it to UTF-8. The returned string may also be a relative path. Use g_build_filename() to convert it to an absolute path:
C code
g_autoptr(GError) local_error = NULL; g_autofree gchar *link_target = g_file_read_link ("/etc/localtime", &local_error); if (local_error != NULL) g_error ("Error reading link: %s", local_error->message); if (!g_path_is_absolute (link_target)) { g_autofree gchar *absolute_link_target = g_build_filename ("/etc", link_target, NULL); g_free (link_target); link_target = g_steal_pointer (&absolute_link_target); }Since: 2.4dirReadName :: (HasCallStack, MonadIO m) => Dir -> m [Char]gi-glib GI.GLib.Structs.Dir Retrieves the name of another entry in the directory, or Nothing. The order of entries returned from this function is not defined, and may vary by file system or other operating-system dependent factors. Nothing may also be returned in case of errors. On Unix, you can check errno to find out if Nothing was returned because of an error. On Unix, the '.' and '..' entries are omitted, and the returned name is in the on-disk encoding. On Windows, as is true of all GLib functions which operate on filenames, the returned name is in UTF-8.
iOChannelRead :: (HasCallStack, MonadIO m) => IOChannel -> Text -> CSize -> CSize -> m IOErrorgi-glib GI.GLib.Structs.IOChannel Deprecated: (Since version 2.2)Use iOChannelReadChars instead.
-
gi-glib GI.GLib.Structs.IOChannel Replacement for iOChannelRead with the new API.
iOChannelReadLine :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, Text, CSize, CSize)gi-glib GI.GLib.Structs.IOChannel Reads a line, including the terminating character(s), from a IOChannel into a newly-allocated string. strReturn will contain allocated memory if the return is IOStatusNormal.
iOChannelReadToEnd :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, ByteString)gi-glib GI.GLib.Structs.IOChannel Reads all the remaining data from the file.
iOChannelReadUnichar :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, Char)gi-glib GI.GLib.Structs.IOChannel Reads a Unicode character from channel. This function cannot be called on a channel with Nothing encoding.