Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. fileCreateReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Maybe b -> m FileIOStream

    gi-gio GI.Gio.Interfaces.File

    Creates a new file and returns a stream for reading and writing to it. The file must not already exist. By default files created are generally readable by everyone, but if you pass FileCreateFlagsPrivate in flags the file will be made readable only to the current user, to the level that is supported on the target filesystem. If cancellable is not Nothing, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error IOErrorEnumCancelled will be returned. If a file or directory with this name already exists, the IOErrorEnumExists error will be returned. Some file systems don't allow all file names, and may return an IOErrorEnumInvalidFilename error, and if the name is too long, IOErrorEnumFilenameTooLong will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Since: 2.22

  2. fileCreateReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

    gi-gio GI.Gio.Interfaces.File

    Asynchronously creates a new file and returns a stream for reading and writing to it. The file must not already exist. For more details, see fileCreateReadwrite which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call fileCreateReadwriteFinish to get the result of the operation. Since: 2.22

  3. fileCreateReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream

    gi-gio GI.Gio.Interfaces.File

    Finishes an asynchronous file create operation started with fileCreateReadwriteAsync. Since: 2.22

  4. fileOpenReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileIOStream

    gi-gio GI.Gio.Interfaces.File

    Opens an existing file for reading and writing. The result is a FileIOStream that can be used to read and write the contents of the file. If cancellable is not Nothing, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error IOErrorEnumCancelled will be returned. If the file does not exist, the IOErrorEnumNotFound error will be returned. If the file is a directory, the IOErrorEnumIsDirectory error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Since: 2.22

  5. fileOpenReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

    gi-gio GI.Gio.Interfaces.File

    Asynchronously opens file for reading and writing. For more details, see fileOpenReadwrite which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call fileOpenReadwriteFinish to get the result of the operation. Since: 2.22

  6. fileOpenReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream

    gi-gio GI.Gio.Interfaces.File

    Finishes an asynchronous file read operation started with fileOpenReadwriteAsync. Since: 2.22

  7. fileRead :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileInputStream

    gi-gio GI.Gio.Interfaces.File

    Opens a file for reading. The result is a FileInputStream that can be used to read the contents of the file. If cancellable is not Nothing, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error IOErrorEnumCancelled will be returned. If the file does not exist, the IOErrorEnumNotFound error will be returned. If the file is a directory, the IOErrorEnumIsDirectory error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.

  8. fileReadAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

    gi-gio GI.Gio.Interfaces.File

    Asynchronously opens file for reading. For more details, see fileRead which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call fileReadFinish to get the result of the operation.

  9. fileReadFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInputStream

    gi-gio GI.Gio.Interfaces.File

    Finishes an asynchronous file read operation started with fileReadAsync.

  10. fileReplaceReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> m FileIOStream

    gi-gio GI.Gio.Interfaces.File

    Returns an output stream for overwriting the file in readwrite mode, possibly creating a backup copy of the file first. If the file doesn't exist, it will be created. For details about the behaviour, see fileReplace which does the same thing but returns an output stream only. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Since: 2.22

Page 507 of many | Previous | Next