Hoogle Search
Within LTS Haskell 24.69 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
datasetForeach :: (HasCallStack, MonadIO m) => Ptr () -> DataForeachFunc -> m ()gi-glib GI.GLib.Functions Calls the given function for each data element which is associated with the given location. Note that this function is NOT thread-safe. So unless datasetLocation can be protected from any modifications during invocation of this function, it should not be called. func can make changes to the dataset, but the iteration will not reflect changes made during the datasetForeach call, other than skipping over elements that are removed.
datasetIdGetData :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())gi-glib GI.GLib.Functions Gets the data element corresponding to a GQuark.
-
gi-glib GI.GLib.Functions Sets the environment variable variable in the provided list envp to value. Since: 2.32
environUnsetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> m [[Char]]gi-glib GI.GLib.Functions Removes the environment variable variable from the provided environment envp. Since: 2.32
fdwalkSetCloexec :: (HasCallStack, MonadIO m) => Int32 -> m Int32gi-glib GI.GLib.Functions Mark every file descriptor equal to or greater than lowfd to be closed at the next execve() or similar, as if via the FD_CLOEXEC flag. Typically lowfd will be 3, to leave standard input, standard output and standard error open after exec. This is the same as Linux close_range (lowfd, ~0U, CLOSE_RANGE_CLOEXEC), but portable to other OSs and to older versions of Linux. This function is async-signal safe, making it safe to call from a signal handler or a [callbackgLib.SpawnChildSetupFunc], as long as lowfd is non-negative. See `signal(7)`) and `signal-safety(7)`) for more details. Since: 2.80
fileSetContents :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> m ()gi-glib GI.GLib.Functions Writes all of contents to a file named filename. This is a convenience wrapper around calling fileSetContentsFull with flags set to G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING and mode set to 0666. Since: 2.8
-
gi-glib GI.GLib.Functions Writes all of contents to a file named filename, with good error checking. If a file called filename already exists it will be overwritten. flags control the properties of the write operation: whether it’s atomic, and what the tradeoff is between returning quickly or being resilient to system crashes. As this function performs file I/O, it is recommended to not call it anywhere where blocking would cause problems, such as in the main loop of a graphical application. In particular, if flags has any value other than FileSetContentsFlagsNone then this function may call fsync(). If FileSetContentsFlagsConsistent is set in flags, the operation is atomic in the sense that it is first written to a temporary file which is then renamed to the final name. Notes:
- On UNIX, if filename already exists hard links to filename will break. Also since the file is recreated, existing permissions, access control lists, metadata etc. may be lost. If filename is a symbolic link, the link itself will be replaced, not the linked file.
- On UNIX, if filename already exists and is non-empty, and if the system supports it (via a journalling filesystem or equivalent), and if FileSetContentsFlagsConsistent is set in flags, the fsync() call (or equivalent) will be used to ensure atomic replacement: filename will contain either its old contents or contents, even in the face of system power loss, the disk being unsafely removed, etc.
- On UNIX, if filename does not already exist or is empty, there is a possibility that system power loss etc. after calling this function will leave filename empty or full of NUL bytes, depending on the underlying filesystem, unless FileSetContentsFlagsDurable and FileSetContentsFlagsConsistent are set in flags.
- On Windows renaming a file will not remove an existing file with the new name, so on Windows there is a race condition between the existing file being removed and the temporary file being renamed.
- On Windows there is no way to remove a file that is open to some process, or mapped into memory. Thus, this function will fail if filename already exists and is open.
getCharset :: (HasCallStack, MonadIO m) => m (Bool, Text)gi-glib GI.GLib.Functions Obtains the character set for the [current locale][setlocale]; you might use this character set as an argument to convert, to convert from the current locale's encoding to some other encoding. (Frequently localeToUtf8 and localeFromUtf8 are nice shortcuts, though.) On Windows the character set returned by this function is the so-called system default ANSI code-page. That is the character set used by the "narrow" versions of C library and Win32 functions that handle file names. It might be different from the character set used by the C library's current locale. On Linux, the character set is found by consulting nl_langinfo() if available. If not, the environment variables LC_ALL, LC_CTYPE, LANG and CHARSET are queried in order. nl_langinfo() returns the C locale if no locale has been loaded by setlocale(). The return value is True if the locale's encoding is UTF-8, in that case you can perhaps avoid calling convert. The string returned in charset is not allocated, and should not be freed.
getCodeset :: (HasCallStack, MonadIO m) => m Textgi-glib GI.GLib.Functions Gets the character set for the current locale.
getConsoleCharset :: (HasCallStack, MonadIO m) => m (Bool, Text)gi-glib GI.GLib.Functions Obtains the character set used by the console attached to the process, which is suitable for printing output to the terminal. Usually this matches the result returned by getCharset, but in environments where the locale's character set does not match the encoding of the console this function tries to guess a more suitable value instead. On Windows the character set returned by this function is the output code page used by the console associated with the calling process. If the codepage can't be determined (for example because there is no console attached) UTF-8 is assumed. The return value is True if the locale's encoding is UTF-8, in that case you can perhaps avoid calling convert. The string returned in charset is not allocated, and should not be freed. Since: 2.62