Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GFileInputStream provides input streams that take their content from a file.
GFileInputStream implements Seekable
, which allows the input
stream to jump to arbitrary positions in the file, provided the
filesystem of the file allows it. To find the position of a file
input stream, use seekableTell
. To find out if a file input
stream supports seeking, use seekableCanSeek
.
To position a file input stream, use seekableSeek
.
- newtype FileInputStream = FileInputStream (ManagedPtr FileInputStream)
- class GObject o => IsFileInputStream o
- toFileInputStream :: IsFileInputStream o => o -> IO FileInputStream
- noFileInputStream :: Maybe FileInputStream
- data FileInputStreamQueryInfoMethodInfo
- fileInputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo
- data FileInputStreamQueryInfoAsyncMethodInfo
- fileInputStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data FileInputStreamQueryInfoFinishMethodInfo
- fileInputStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) => a -> b -> m FileInfo
Exported types
newtype FileInputStream Source #
GObject FileInputStream Source # | |
IsObject FileInputStream Source # | |
IsInputStream FileInputStream Source # | |
IsFileInputStream FileInputStream Source # | |
IsSeekable FileInputStream Source # | |
((~) * info (ResolveFileInputStreamMethod t FileInputStream), MethodInfo * info FileInputStream p) => IsLabel t (FileInputStream -> p) Source # | |
((~) * info (ResolveFileInputStreamMethod t FileInputStream), MethodInfo * info FileInputStream p) => IsLabelProxy t (FileInputStream -> p) Source # | |
HasAttributeList * FileInputStream Source # | |
type AttributeList FileInputStream Source # | |
type SignalList FileInputStream Source # | |
class GObject o => IsFileInputStream o Source #
toFileInputStream :: IsFileInputStream o => o -> IO FileInputStream Source #
Methods
queryInfo
data FileInputStreamQueryInfoMethodInfo Source #
((~) * signature (Text -> Maybe b -> m FileInfo), MonadIO m, IsFileInputStream a, IsCancellable b) => MethodInfo * FileInputStreamQueryInfoMethodInfo a signature Source # | |
fileInputStreamQueryInfo Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m FileInfo | Returns: a |
Queries a file input stream the given attributes
. This function blocks
while querying the stream. For the asynchronous (non-blocking) version
of this function, see fileInputStreamQueryInfoAsync
. While the
stream is blocked, the stream will set the pending flag internally, and
any other operations on the stream will fail with IOErrorEnumPending
.
queryInfoAsync
data FileInputStreamQueryInfoAsyncMethodInfo Source #
((~) * signature (Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsFileInputStream a, IsCancellable b) => MethodInfo * FileInputStreamQueryInfoAsyncMethodInfo a signature Source # | |
fileInputStreamQueryInfoAsync Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Queries the stream information asynchronously.
When the operation is finished callback
will be called.
You can then call fileInputStreamQueryInfoFinish
to get the result of the operation.
For the synchronous version of this function,
see fileInputStreamQueryInfo
.
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 set
queryInfoFinish
data FileInputStreamQueryInfoFinishMethodInfo Source #
((~) * signature (b -> m FileInfo), MonadIO m, IsFileInputStream a, IsAsyncResult b) => MethodInfo * FileInputStreamQueryInfoFinishMethodInfo a signature Source # | |
fileInputStreamQueryInfoFinish Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m FileInfo |
Finishes an asynchronous info query operation.